{-# 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.DirectoryService.RegisterCertificate
-- 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)
--
-- Registers a certificate for a secure LDAP or client certificate
-- authentication.
module Amazonka.DirectoryService.RegisterCertificate
  ( -- * Creating a Request
    RegisterCertificate (..),
    newRegisterCertificate,

    -- * Request Lenses
    registerCertificate_clientCertAuthSettings,
    registerCertificate_type,
    registerCertificate_directoryId,
    registerCertificate_certificateData,

    -- * Destructuring the Response
    RegisterCertificateResponse (..),
    newRegisterCertificateResponse,

    -- * Response Lenses
    registerCertificateResponse_certificateId,
    registerCertificateResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.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:/ 'newRegisterCertificate' smart constructor.
data RegisterCertificate = RegisterCertificate'
  { -- | A @ClientCertAuthSettings@ object that contains client certificate
    -- authentication settings.
    RegisterCertificate -> Maybe ClientCertAuthSettings
clientCertAuthSettings :: Prelude.Maybe ClientCertAuthSettings,
    -- | The function that the registered certificate performs. Valid values
    -- include @ClientLDAPS@ or @ClientCertAuth@. The default value is
    -- @ClientLDAPS@.
    RegisterCertificate -> Maybe CertificateType
type' :: Prelude.Maybe CertificateType,
    -- | The identifier of the directory.
    RegisterCertificate -> Text
directoryId :: Prelude.Text,
    -- | The certificate PEM string that needs to be registered.
    RegisterCertificate -> Text
certificateData :: Prelude.Text
  }
  deriving (RegisterCertificate -> RegisterCertificate -> Bool
(RegisterCertificate -> RegisterCertificate -> Bool)
-> (RegisterCertificate -> RegisterCertificate -> Bool)
-> Eq RegisterCertificate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterCertificate -> RegisterCertificate -> Bool
$c/= :: RegisterCertificate -> RegisterCertificate -> Bool
== :: RegisterCertificate -> RegisterCertificate -> Bool
$c== :: RegisterCertificate -> RegisterCertificate -> Bool
Prelude.Eq, ReadPrec [RegisterCertificate]
ReadPrec RegisterCertificate
Int -> ReadS RegisterCertificate
ReadS [RegisterCertificate]
(Int -> ReadS RegisterCertificate)
-> ReadS [RegisterCertificate]
-> ReadPrec RegisterCertificate
-> ReadPrec [RegisterCertificate]
-> Read RegisterCertificate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterCertificate]
$creadListPrec :: ReadPrec [RegisterCertificate]
readPrec :: ReadPrec RegisterCertificate
$creadPrec :: ReadPrec RegisterCertificate
readList :: ReadS [RegisterCertificate]
$creadList :: ReadS [RegisterCertificate]
readsPrec :: Int -> ReadS RegisterCertificate
$creadsPrec :: Int -> ReadS RegisterCertificate
Prelude.Read, Int -> RegisterCertificate -> ShowS
[RegisterCertificate] -> ShowS
RegisterCertificate -> String
(Int -> RegisterCertificate -> ShowS)
-> (RegisterCertificate -> String)
-> ([RegisterCertificate] -> ShowS)
-> Show RegisterCertificate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterCertificate] -> ShowS
$cshowList :: [RegisterCertificate] -> ShowS
show :: RegisterCertificate -> String
$cshow :: RegisterCertificate -> String
showsPrec :: Int -> RegisterCertificate -> ShowS
$cshowsPrec :: Int -> RegisterCertificate -> ShowS
Prelude.Show, (forall x. RegisterCertificate -> Rep RegisterCertificate x)
-> (forall x. Rep RegisterCertificate x -> RegisterCertificate)
-> Generic RegisterCertificate
forall x. Rep RegisterCertificate x -> RegisterCertificate
forall x. RegisterCertificate -> Rep RegisterCertificate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterCertificate x -> RegisterCertificate
$cfrom :: forall x. RegisterCertificate -> Rep RegisterCertificate x
Prelude.Generic)

-- |
-- Create a value of 'RegisterCertificate' 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:
--
-- 'clientCertAuthSettings', 'registerCertificate_clientCertAuthSettings' - A @ClientCertAuthSettings@ object that contains client certificate
-- authentication settings.
--
-- 'type'', 'registerCertificate_type' - The function that the registered certificate performs. Valid values
-- include @ClientLDAPS@ or @ClientCertAuth@. The default value is
-- @ClientLDAPS@.
--
-- 'directoryId', 'registerCertificate_directoryId' - The identifier of the directory.
--
-- 'certificateData', 'registerCertificate_certificateData' - The certificate PEM string that needs to be registered.
newRegisterCertificate ::
  -- | 'directoryId'
  Prelude.Text ->
  -- | 'certificateData'
  Prelude.Text ->
  RegisterCertificate
newRegisterCertificate :: Text -> Text -> RegisterCertificate
newRegisterCertificate
  Text
pDirectoryId_
  Text
pCertificateData_ =
    RegisterCertificate' :: Maybe ClientCertAuthSettings
-> Maybe CertificateType -> Text -> Text -> RegisterCertificate
RegisterCertificate'
      { $sel:clientCertAuthSettings:RegisterCertificate' :: Maybe ClientCertAuthSettings
clientCertAuthSettings =
          Maybe ClientCertAuthSettings
forall a. Maybe a
Prelude.Nothing,
        $sel:type':RegisterCertificate' :: Maybe CertificateType
type' = Maybe CertificateType
forall a. Maybe a
Prelude.Nothing,
        $sel:directoryId:RegisterCertificate' :: Text
directoryId = Text
pDirectoryId_,
        $sel:certificateData:RegisterCertificate' :: Text
certificateData = Text
pCertificateData_
      }

-- | A @ClientCertAuthSettings@ object that contains client certificate
-- authentication settings.
registerCertificate_clientCertAuthSettings :: Lens.Lens' RegisterCertificate (Prelude.Maybe ClientCertAuthSettings)
registerCertificate_clientCertAuthSettings :: (Maybe ClientCertAuthSettings -> f (Maybe ClientCertAuthSettings))
-> RegisterCertificate -> f RegisterCertificate
registerCertificate_clientCertAuthSettings = (RegisterCertificate -> Maybe ClientCertAuthSettings)
-> (RegisterCertificate
    -> Maybe ClientCertAuthSettings -> RegisterCertificate)
-> Lens
     RegisterCertificate
     RegisterCertificate
     (Maybe ClientCertAuthSettings)
     (Maybe ClientCertAuthSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCertificate' {Maybe ClientCertAuthSettings
clientCertAuthSettings :: Maybe ClientCertAuthSettings
$sel:clientCertAuthSettings:RegisterCertificate' :: RegisterCertificate -> Maybe ClientCertAuthSettings
clientCertAuthSettings} -> Maybe ClientCertAuthSettings
clientCertAuthSettings) (\s :: RegisterCertificate
s@RegisterCertificate' {} Maybe ClientCertAuthSettings
a -> RegisterCertificate
s {$sel:clientCertAuthSettings:RegisterCertificate' :: Maybe ClientCertAuthSettings
clientCertAuthSettings = Maybe ClientCertAuthSettings
a} :: RegisterCertificate)

-- | The function that the registered certificate performs. Valid values
-- include @ClientLDAPS@ or @ClientCertAuth@. The default value is
-- @ClientLDAPS@.
registerCertificate_type :: Lens.Lens' RegisterCertificate (Prelude.Maybe CertificateType)
registerCertificate_type :: (Maybe CertificateType -> f (Maybe CertificateType))
-> RegisterCertificate -> f RegisterCertificate
registerCertificate_type = (RegisterCertificate -> Maybe CertificateType)
-> (RegisterCertificate
    -> Maybe CertificateType -> RegisterCertificate)
-> Lens
     RegisterCertificate
     RegisterCertificate
     (Maybe CertificateType)
     (Maybe CertificateType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCertificate' {Maybe CertificateType
type' :: Maybe CertificateType
$sel:type':RegisterCertificate' :: RegisterCertificate -> Maybe CertificateType
type'} -> Maybe CertificateType
type') (\s :: RegisterCertificate
s@RegisterCertificate' {} Maybe CertificateType
a -> RegisterCertificate
s {$sel:type':RegisterCertificate' :: Maybe CertificateType
type' = Maybe CertificateType
a} :: RegisterCertificate)

-- | The identifier of the directory.
registerCertificate_directoryId :: Lens.Lens' RegisterCertificate Prelude.Text
registerCertificate_directoryId :: (Text -> f Text) -> RegisterCertificate -> f RegisterCertificate
registerCertificate_directoryId = (RegisterCertificate -> Text)
-> (RegisterCertificate -> Text -> RegisterCertificate)
-> Lens RegisterCertificate RegisterCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCertificate' {Text
directoryId :: Text
$sel:directoryId:RegisterCertificate' :: RegisterCertificate -> Text
directoryId} -> Text
directoryId) (\s :: RegisterCertificate
s@RegisterCertificate' {} Text
a -> RegisterCertificate
s {$sel:directoryId:RegisterCertificate' :: Text
directoryId = Text
a} :: RegisterCertificate)

-- | The certificate PEM string that needs to be registered.
registerCertificate_certificateData :: Lens.Lens' RegisterCertificate Prelude.Text
registerCertificate_certificateData :: (Text -> f Text) -> RegisterCertificate -> f RegisterCertificate
registerCertificate_certificateData = (RegisterCertificate -> Text)
-> (RegisterCertificate -> Text -> RegisterCertificate)
-> Lens RegisterCertificate RegisterCertificate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCertificate' {Text
certificateData :: Text
$sel:certificateData:RegisterCertificate' :: RegisterCertificate -> Text
certificateData} -> Text
certificateData) (\s :: RegisterCertificate
s@RegisterCertificate' {} Text
a -> RegisterCertificate
s {$sel:certificateData:RegisterCertificate' :: Text
certificateData = Text
a} :: RegisterCertificate)

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

instance Prelude.NFData RegisterCertificate

instance Core.ToHeaders RegisterCertificate where
  toHeaders :: RegisterCertificate -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RegisterCertificate -> 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
"DirectoryService_20150416.RegisterCertificate" ::
                          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 RegisterCertificate where
  toJSON :: RegisterCertificate -> Value
toJSON RegisterCertificate' {Maybe CertificateType
Maybe ClientCertAuthSettings
Text
certificateData :: Text
directoryId :: Text
type' :: Maybe CertificateType
clientCertAuthSettings :: Maybe ClientCertAuthSettings
$sel:certificateData:RegisterCertificate' :: RegisterCertificate -> Text
$sel:directoryId:RegisterCertificate' :: RegisterCertificate -> Text
$sel:type':RegisterCertificate' :: RegisterCertificate -> Maybe CertificateType
$sel:clientCertAuthSettings:RegisterCertificate' :: RegisterCertificate -> Maybe ClientCertAuthSettings
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ClientCertAuthSettings" Text -> ClientCertAuthSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ClientCertAuthSettings -> Pair)
-> Maybe ClientCertAuthSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ClientCertAuthSettings
clientCertAuthSettings,
            (Text
"Type" Text -> CertificateType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CertificateType -> Pair) -> Maybe CertificateType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CertificateType
type',
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DirectoryId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
directoryId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"CertificateData" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
certificateData)
          ]
      )

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

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

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

-- |
-- Create a value of 'RegisterCertificateResponse' 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:
--
-- 'certificateId', 'registerCertificateResponse_certificateId' - The identifier of the certificate.
--
-- 'httpStatus', 'registerCertificateResponse_httpStatus' - The response's http status code.
newRegisterCertificateResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RegisterCertificateResponse
newRegisterCertificateResponse :: Int -> RegisterCertificateResponse
newRegisterCertificateResponse Int
pHttpStatus_ =
  RegisterCertificateResponse' :: Maybe Text -> Int -> RegisterCertificateResponse
RegisterCertificateResponse'
    { $sel:certificateId:RegisterCertificateResponse' :: Maybe Text
certificateId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RegisterCertificateResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier of the certificate.
registerCertificateResponse_certificateId :: Lens.Lens' RegisterCertificateResponse (Prelude.Maybe Prelude.Text)
registerCertificateResponse_certificateId :: (Maybe Text -> f (Maybe Text))
-> RegisterCertificateResponse -> f RegisterCertificateResponse
registerCertificateResponse_certificateId = (RegisterCertificateResponse -> Maybe Text)
-> (RegisterCertificateResponse
    -> Maybe Text -> RegisterCertificateResponse)
-> Lens
     RegisterCertificateResponse
     RegisterCertificateResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterCertificateResponse' {Maybe Text
certificateId :: Maybe Text
$sel:certificateId:RegisterCertificateResponse' :: RegisterCertificateResponse -> Maybe Text
certificateId} -> Maybe Text
certificateId) (\s :: RegisterCertificateResponse
s@RegisterCertificateResponse' {} Maybe Text
a -> RegisterCertificateResponse
s {$sel:certificateId:RegisterCertificateResponse' :: Maybe Text
certificateId = Maybe Text
a} :: RegisterCertificateResponse)

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

instance Prelude.NFData RegisterCertificateResponse