{-# 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.RegisterThing
-- 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)
--
-- Provisions a thing in the device registry. RegisterThing calls other IoT
-- control plane APIs. These calls might exceed your account level
-- <https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot IoT Throttling Limits>
-- and cause throttle errors. Please contact
-- <https://console.aws.amazon.com/support/home Amazon Web Services Customer Support>
-- to raise your throttling limits if necessary.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions RegisterThing>
-- action.
module Amazonka.IoT.RegisterThing
  ( -- * Creating a Request
    RegisterThing (..),
    newRegisterThing,

    -- * Request Lenses
    registerThing_parameters,
    registerThing_templateBody,

    -- * Destructuring the Response
    RegisterThingResponse (..),
    newRegisterThingResponse,

    -- * Response Lenses
    registerThingResponse_certificatePem,
    registerThingResponse_resourceArns,
    registerThingResponse_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:/ 'newRegisterThing' smart constructor.
data RegisterThing = RegisterThing'
  { -- | The parameters for provisioning a thing. See
    -- <https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html Provisioning Templates>
    -- for more information.
    RegisterThing -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The provisioning template. See
    -- <https://docs.aws.amazon.com/iot/latest/developerguide/provision-w-cert.html Provisioning Devices That Have Device Certificates>
    -- for more information.
    RegisterThing -> Text
templateBody :: Prelude.Text
  }
  deriving (RegisterThing -> RegisterThing -> Bool
(RegisterThing -> RegisterThing -> Bool)
-> (RegisterThing -> RegisterThing -> Bool) -> Eq RegisterThing
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterThing -> RegisterThing -> Bool
$c/= :: RegisterThing -> RegisterThing -> Bool
== :: RegisterThing -> RegisterThing -> Bool
$c== :: RegisterThing -> RegisterThing -> Bool
Prelude.Eq, ReadPrec [RegisterThing]
ReadPrec RegisterThing
Int -> ReadS RegisterThing
ReadS [RegisterThing]
(Int -> ReadS RegisterThing)
-> ReadS [RegisterThing]
-> ReadPrec RegisterThing
-> ReadPrec [RegisterThing]
-> Read RegisterThing
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterThing]
$creadListPrec :: ReadPrec [RegisterThing]
readPrec :: ReadPrec RegisterThing
$creadPrec :: ReadPrec RegisterThing
readList :: ReadS [RegisterThing]
$creadList :: ReadS [RegisterThing]
readsPrec :: Int -> ReadS RegisterThing
$creadsPrec :: Int -> ReadS RegisterThing
Prelude.Read, Int -> RegisterThing -> ShowS
[RegisterThing] -> ShowS
RegisterThing -> String
(Int -> RegisterThing -> ShowS)
-> (RegisterThing -> String)
-> ([RegisterThing] -> ShowS)
-> Show RegisterThing
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterThing] -> ShowS
$cshowList :: [RegisterThing] -> ShowS
show :: RegisterThing -> String
$cshow :: RegisterThing -> String
showsPrec :: Int -> RegisterThing -> ShowS
$cshowsPrec :: Int -> RegisterThing -> ShowS
Prelude.Show, (forall x. RegisterThing -> Rep RegisterThing x)
-> (forall x. Rep RegisterThing x -> RegisterThing)
-> Generic RegisterThing
forall x. Rep RegisterThing x -> RegisterThing
forall x. RegisterThing -> Rep RegisterThing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterThing x -> RegisterThing
$cfrom :: forall x. RegisterThing -> Rep RegisterThing x
Prelude.Generic)

-- |
-- Create a value of 'RegisterThing' 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:
--
-- 'parameters', 'registerThing_parameters' - The parameters for provisioning a thing. See
-- <https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html Provisioning Templates>
-- for more information.
--
-- 'templateBody', 'registerThing_templateBody' - The provisioning template. See
-- <https://docs.aws.amazon.com/iot/latest/developerguide/provision-w-cert.html Provisioning Devices That Have Device Certificates>
-- for more information.
newRegisterThing ::
  -- | 'templateBody'
  Prelude.Text ->
  RegisterThing
newRegisterThing :: Text -> RegisterThing
newRegisterThing Text
pTemplateBody_ =
  RegisterThing' :: Maybe (HashMap Text Text) -> Text -> RegisterThing
RegisterThing'
    { $sel:parameters:RegisterThing' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:RegisterThing' :: Text
templateBody = Text
pTemplateBody_
    }

-- | The parameters for provisioning a thing. See
-- <https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html Provisioning Templates>
-- for more information.
registerThing_parameters :: Lens.Lens' RegisterThing (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
registerThing_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegisterThing -> f RegisterThing
registerThing_parameters = (RegisterThing -> Maybe (HashMap Text Text))
-> (RegisterThing -> Maybe (HashMap Text Text) -> RegisterThing)
-> Lens
     RegisterThing
     RegisterThing
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterThing' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:RegisterThing' :: RegisterThing -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: RegisterThing
s@RegisterThing' {} Maybe (HashMap Text Text)
a -> RegisterThing
s {$sel:parameters:RegisterThing' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: RegisterThing) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> RegisterThing -> f RegisterThing)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegisterThing
-> f RegisterThing
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The provisioning template. See
-- <https://docs.aws.amazon.com/iot/latest/developerguide/provision-w-cert.html Provisioning Devices That Have Device Certificates>
-- for more information.
registerThing_templateBody :: Lens.Lens' RegisterThing Prelude.Text
registerThing_templateBody :: (Text -> f Text) -> RegisterThing -> f RegisterThing
registerThing_templateBody = (RegisterThing -> Text)
-> (RegisterThing -> Text -> RegisterThing)
-> Lens RegisterThing RegisterThing Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterThing' {Text
templateBody :: Text
$sel:templateBody:RegisterThing' :: RegisterThing -> Text
templateBody} -> Text
templateBody) (\s :: RegisterThing
s@RegisterThing' {} Text
a -> RegisterThing
s {$sel:templateBody:RegisterThing' :: Text
templateBody = Text
a} :: RegisterThing)

instance Core.AWSRequest RegisterThing where
  type
    AWSResponse RegisterThing =
      RegisterThingResponse
  request :: RegisterThing -> Request RegisterThing
request = Service -> RegisterThing -> Request RegisterThing
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RegisterThing
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterThing)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RegisterThing))
-> Logger
-> Service
-> Proxy RegisterThing
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RegisterThing)))
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 (HashMap Text Text) -> Int -> RegisterThingResponse
RegisterThingResponse'
            (Maybe Text
 -> Maybe (HashMap Text Text) -> Int -> RegisterThingResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> RegisterThingResponse)
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
"certificatePem")
            Either
  String (Maybe (HashMap Text Text) -> Int -> RegisterThingResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> RegisterThingResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"resourceArns" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> RegisterThingResponse)
-> Either String Int -> Either String RegisterThingResponse
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 RegisterThing

instance Prelude.NFData RegisterThing

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

instance Core.ToJSON RegisterThing where
  toJSON :: RegisterThing -> Value
toJSON RegisterThing' {Maybe (HashMap Text Text)
Text
templateBody :: Text
parameters :: Maybe (HashMap Text Text)
$sel:templateBody:RegisterThing' :: RegisterThing -> Text
$sel:parameters:RegisterThing' :: RegisterThing -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"parameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
parameters,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"templateBody" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
templateBody)
          ]
      )

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

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

-- | /See:/ 'newRegisterThingResponse' smart constructor.
data RegisterThingResponse = RegisterThingResponse'
  { -- | The certificate data, in PEM format.
    RegisterThingResponse -> Maybe Text
certificatePem :: Prelude.Maybe Prelude.Text,
    -- | ARNs for the generated resources.
    RegisterThingResponse -> Maybe (HashMap Text Text)
resourceArns :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    RegisterThingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RegisterThingResponse -> RegisterThingResponse -> Bool
(RegisterThingResponse -> RegisterThingResponse -> Bool)
-> (RegisterThingResponse -> RegisterThingResponse -> Bool)
-> Eq RegisterThingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterThingResponse -> RegisterThingResponse -> Bool
$c/= :: RegisterThingResponse -> RegisterThingResponse -> Bool
== :: RegisterThingResponse -> RegisterThingResponse -> Bool
$c== :: RegisterThingResponse -> RegisterThingResponse -> Bool
Prelude.Eq, ReadPrec [RegisterThingResponse]
ReadPrec RegisterThingResponse
Int -> ReadS RegisterThingResponse
ReadS [RegisterThingResponse]
(Int -> ReadS RegisterThingResponse)
-> ReadS [RegisterThingResponse]
-> ReadPrec RegisterThingResponse
-> ReadPrec [RegisterThingResponse]
-> Read RegisterThingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterThingResponse]
$creadListPrec :: ReadPrec [RegisterThingResponse]
readPrec :: ReadPrec RegisterThingResponse
$creadPrec :: ReadPrec RegisterThingResponse
readList :: ReadS [RegisterThingResponse]
$creadList :: ReadS [RegisterThingResponse]
readsPrec :: Int -> ReadS RegisterThingResponse
$creadsPrec :: Int -> ReadS RegisterThingResponse
Prelude.Read, Int -> RegisterThingResponse -> ShowS
[RegisterThingResponse] -> ShowS
RegisterThingResponse -> String
(Int -> RegisterThingResponse -> ShowS)
-> (RegisterThingResponse -> String)
-> ([RegisterThingResponse] -> ShowS)
-> Show RegisterThingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterThingResponse] -> ShowS
$cshowList :: [RegisterThingResponse] -> ShowS
show :: RegisterThingResponse -> String
$cshow :: RegisterThingResponse -> String
showsPrec :: Int -> RegisterThingResponse -> ShowS
$cshowsPrec :: Int -> RegisterThingResponse -> ShowS
Prelude.Show, (forall x. RegisterThingResponse -> Rep RegisterThingResponse x)
-> (forall x. Rep RegisterThingResponse x -> RegisterThingResponse)
-> Generic RegisterThingResponse
forall x. Rep RegisterThingResponse x -> RegisterThingResponse
forall x. RegisterThingResponse -> Rep RegisterThingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterThingResponse x -> RegisterThingResponse
$cfrom :: forall x. RegisterThingResponse -> Rep RegisterThingResponse x
Prelude.Generic)

-- |
-- Create a value of 'RegisterThingResponse' 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:
--
-- 'certificatePem', 'registerThingResponse_certificatePem' - The certificate data, in PEM format.
--
-- 'resourceArns', 'registerThingResponse_resourceArns' - ARNs for the generated resources.
--
-- 'httpStatus', 'registerThingResponse_httpStatus' - The response's http status code.
newRegisterThingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RegisterThingResponse
newRegisterThingResponse :: Int -> RegisterThingResponse
newRegisterThingResponse Int
pHttpStatus_ =
  RegisterThingResponse' :: Maybe Text
-> Maybe (HashMap Text Text) -> Int -> RegisterThingResponse
RegisterThingResponse'
    { $sel:certificatePem:RegisterThingResponse' :: Maybe Text
certificatePem =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArns:RegisterThingResponse' :: Maybe (HashMap Text Text)
resourceArns = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RegisterThingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The certificate data, in PEM format.
registerThingResponse_certificatePem :: Lens.Lens' RegisterThingResponse (Prelude.Maybe Prelude.Text)
registerThingResponse_certificatePem :: (Maybe Text -> f (Maybe Text))
-> RegisterThingResponse -> f RegisterThingResponse
registerThingResponse_certificatePem = (RegisterThingResponse -> Maybe Text)
-> (RegisterThingResponse -> Maybe Text -> RegisterThingResponse)
-> Lens
     RegisterThingResponse
     RegisterThingResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterThingResponse' {Maybe Text
certificatePem :: Maybe Text
$sel:certificatePem:RegisterThingResponse' :: RegisterThingResponse -> Maybe Text
certificatePem} -> Maybe Text
certificatePem) (\s :: RegisterThingResponse
s@RegisterThingResponse' {} Maybe Text
a -> RegisterThingResponse
s {$sel:certificatePem:RegisterThingResponse' :: Maybe Text
certificatePem = Maybe Text
a} :: RegisterThingResponse)

-- | ARNs for the generated resources.
registerThingResponse_resourceArns :: Lens.Lens' RegisterThingResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
registerThingResponse_resourceArns :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegisterThingResponse -> f RegisterThingResponse
registerThingResponse_resourceArns = (RegisterThingResponse -> Maybe (HashMap Text Text))
-> (RegisterThingResponse
    -> Maybe (HashMap Text Text) -> RegisterThingResponse)
-> Lens
     RegisterThingResponse
     RegisterThingResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterThingResponse' {Maybe (HashMap Text Text)
resourceArns :: Maybe (HashMap Text Text)
$sel:resourceArns:RegisterThingResponse' :: RegisterThingResponse -> Maybe (HashMap Text Text)
resourceArns} -> Maybe (HashMap Text Text)
resourceArns) (\s :: RegisterThingResponse
s@RegisterThingResponse' {} Maybe (HashMap Text Text)
a -> RegisterThingResponse
s {$sel:resourceArns:RegisterThingResponse' :: Maybe (HashMap Text Text)
resourceArns = Maybe (HashMap Text Text)
a} :: RegisterThingResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> RegisterThingResponse -> f RegisterThingResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RegisterThingResponse
-> f RegisterThingResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData RegisterThingResponse