{-# 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.UpdateThingGroupsForThing
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the groups to which the thing belongs.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateThingGroupsForThing>
-- action.
module Amazonka.IoT.UpdateThingGroupsForThing
  ( -- * Creating a Request
    UpdateThingGroupsForThing (..),
    newUpdateThingGroupsForThing,

    -- * Request Lenses
    updateThingGroupsForThing_overrideDynamicGroups,
    updateThingGroupsForThing_thingGroupsToAdd,
    updateThingGroupsForThing_thingGroupsToRemove,
    updateThingGroupsForThing_thingName,

    -- * Destructuring the Response
    UpdateThingGroupsForThingResponse (..),
    newUpdateThingGroupsForThingResponse,

    -- * Response Lenses
    updateThingGroupsForThingResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateThingGroupsForThing' smart constructor.
data UpdateThingGroupsForThing = UpdateThingGroupsForThing'
  { -- | Override dynamic thing groups with static thing groups when 10-group
    -- limit is reached. If a thing belongs to 10 thing groups, and one or more
    -- of those groups are dynamic thing groups, adding a thing to a static
    -- group removes the thing from the last dynamic group.
    UpdateThingGroupsForThing -> Maybe Bool
overrideDynamicGroups :: Prelude.Maybe Prelude.Bool,
    -- | The groups to which the thing will be added.
    UpdateThingGroupsForThing -> Maybe [Text]
thingGroupsToAdd :: Prelude.Maybe [Prelude.Text],
    -- | The groups from which the thing will be removed.
    UpdateThingGroupsForThing -> Maybe [Text]
thingGroupsToRemove :: Prelude.Maybe [Prelude.Text],
    -- | The thing whose group memberships will be updated.
    UpdateThingGroupsForThing -> Maybe Text
thingName :: Prelude.Maybe Prelude.Text
  }
  deriving (UpdateThingGroupsForThing -> UpdateThingGroupsForThing -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateThingGroupsForThing -> UpdateThingGroupsForThing -> Bool
$c/= :: UpdateThingGroupsForThing -> UpdateThingGroupsForThing -> Bool
== :: UpdateThingGroupsForThing -> UpdateThingGroupsForThing -> Bool
$c== :: UpdateThingGroupsForThing -> UpdateThingGroupsForThing -> Bool
Prelude.Eq, ReadPrec [UpdateThingGroupsForThing]
ReadPrec UpdateThingGroupsForThing
Int -> ReadS UpdateThingGroupsForThing
ReadS [UpdateThingGroupsForThing]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateThingGroupsForThing]
$creadListPrec :: ReadPrec [UpdateThingGroupsForThing]
readPrec :: ReadPrec UpdateThingGroupsForThing
$creadPrec :: ReadPrec UpdateThingGroupsForThing
readList :: ReadS [UpdateThingGroupsForThing]
$creadList :: ReadS [UpdateThingGroupsForThing]
readsPrec :: Int -> ReadS UpdateThingGroupsForThing
$creadsPrec :: Int -> ReadS UpdateThingGroupsForThing
Prelude.Read, Int -> UpdateThingGroupsForThing -> ShowS
[UpdateThingGroupsForThing] -> ShowS
UpdateThingGroupsForThing -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateThingGroupsForThing] -> ShowS
$cshowList :: [UpdateThingGroupsForThing] -> ShowS
show :: UpdateThingGroupsForThing -> String
$cshow :: UpdateThingGroupsForThing -> String
showsPrec :: Int -> UpdateThingGroupsForThing -> ShowS
$cshowsPrec :: Int -> UpdateThingGroupsForThing -> ShowS
Prelude.Show, forall x.
Rep UpdateThingGroupsForThing x -> UpdateThingGroupsForThing
forall x.
UpdateThingGroupsForThing -> Rep UpdateThingGroupsForThing x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateThingGroupsForThing x -> UpdateThingGroupsForThing
$cfrom :: forall x.
UpdateThingGroupsForThing -> Rep UpdateThingGroupsForThing x
Prelude.Generic)

-- |
-- Create a value of 'UpdateThingGroupsForThing' 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:
--
-- 'overrideDynamicGroups', 'updateThingGroupsForThing_overrideDynamicGroups' - Override dynamic thing groups with static thing groups when 10-group
-- limit is reached. If a thing belongs to 10 thing groups, and one or more
-- of those groups are dynamic thing groups, adding a thing to a static
-- group removes the thing from the last dynamic group.
--
-- 'thingGroupsToAdd', 'updateThingGroupsForThing_thingGroupsToAdd' - The groups to which the thing will be added.
--
-- 'thingGroupsToRemove', 'updateThingGroupsForThing_thingGroupsToRemove' - The groups from which the thing will be removed.
--
-- 'thingName', 'updateThingGroupsForThing_thingName' - The thing whose group memberships will be updated.
newUpdateThingGroupsForThing ::
  UpdateThingGroupsForThing
newUpdateThingGroupsForThing :: UpdateThingGroupsForThing
newUpdateThingGroupsForThing =
  UpdateThingGroupsForThing'
    { $sel:overrideDynamicGroups:UpdateThingGroupsForThing' :: Maybe Bool
overrideDynamicGroups =
        forall a. Maybe a
Prelude.Nothing,
      $sel:thingGroupsToAdd:UpdateThingGroupsForThing' :: Maybe [Text]
thingGroupsToAdd = forall a. Maybe a
Prelude.Nothing,
      $sel:thingGroupsToRemove:UpdateThingGroupsForThing' :: Maybe [Text]
thingGroupsToRemove = forall a. Maybe a
Prelude.Nothing,
      $sel:thingName:UpdateThingGroupsForThing' :: Maybe Text
thingName = forall a. Maybe a
Prelude.Nothing
    }

-- | Override dynamic thing groups with static thing groups when 10-group
-- limit is reached. If a thing belongs to 10 thing groups, and one or more
-- of those groups are dynamic thing groups, adding a thing to a static
-- group removes the thing from the last dynamic group.
updateThingGroupsForThing_overrideDynamicGroups :: Lens.Lens' UpdateThingGroupsForThing (Prelude.Maybe Prelude.Bool)
updateThingGroupsForThing_overrideDynamicGroups :: Lens' UpdateThingGroupsForThing (Maybe Bool)
updateThingGroupsForThing_overrideDynamicGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThingGroupsForThing' {Maybe Bool
overrideDynamicGroups :: Maybe Bool
$sel:overrideDynamicGroups:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Bool
overrideDynamicGroups} -> Maybe Bool
overrideDynamicGroups) (\s :: UpdateThingGroupsForThing
s@UpdateThingGroupsForThing' {} Maybe Bool
a -> UpdateThingGroupsForThing
s {$sel:overrideDynamicGroups:UpdateThingGroupsForThing' :: Maybe Bool
overrideDynamicGroups = Maybe Bool
a} :: UpdateThingGroupsForThing)

-- | The groups to which the thing will be added.
updateThingGroupsForThing_thingGroupsToAdd :: Lens.Lens' UpdateThingGroupsForThing (Prelude.Maybe [Prelude.Text])
updateThingGroupsForThing_thingGroupsToAdd :: Lens' UpdateThingGroupsForThing (Maybe [Text])
updateThingGroupsForThing_thingGroupsToAdd = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThingGroupsForThing' {Maybe [Text]
thingGroupsToAdd :: Maybe [Text]
$sel:thingGroupsToAdd:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
thingGroupsToAdd} -> Maybe [Text]
thingGroupsToAdd) (\s :: UpdateThingGroupsForThing
s@UpdateThingGroupsForThing' {} Maybe [Text]
a -> UpdateThingGroupsForThing
s {$sel:thingGroupsToAdd:UpdateThingGroupsForThing' :: Maybe [Text]
thingGroupsToAdd = Maybe [Text]
a} :: UpdateThingGroupsForThing) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The groups from which the thing will be removed.
updateThingGroupsForThing_thingGroupsToRemove :: Lens.Lens' UpdateThingGroupsForThing (Prelude.Maybe [Prelude.Text])
updateThingGroupsForThing_thingGroupsToRemove :: Lens' UpdateThingGroupsForThing (Maybe [Text])
updateThingGroupsForThing_thingGroupsToRemove = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThingGroupsForThing' {Maybe [Text]
thingGroupsToRemove :: Maybe [Text]
$sel:thingGroupsToRemove:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
thingGroupsToRemove} -> Maybe [Text]
thingGroupsToRemove) (\s :: UpdateThingGroupsForThing
s@UpdateThingGroupsForThing' {} Maybe [Text]
a -> UpdateThingGroupsForThing
s {$sel:thingGroupsToRemove:UpdateThingGroupsForThing' :: Maybe [Text]
thingGroupsToRemove = Maybe [Text]
a} :: UpdateThingGroupsForThing) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The thing whose group memberships will be updated.
updateThingGroupsForThing_thingName :: Lens.Lens' UpdateThingGroupsForThing (Prelude.Maybe Prelude.Text)
updateThingGroupsForThing_thingName :: Lens' UpdateThingGroupsForThing (Maybe Text)
updateThingGroupsForThing_thingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateThingGroupsForThing' {Maybe Text
thingName :: Maybe Text
$sel:thingName:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Text
thingName} -> Maybe Text
thingName) (\s :: UpdateThingGroupsForThing
s@UpdateThingGroupsForThing' {} Maybe Text
a -> UpdateThingGroupsForThing
s {$sel:thingName:UpdateThingGroupsForThing' :: Maybe Text
thingName = Maybe Text
a} :: UpdateThingGroupsForThing)

instance Core.AWSRequest UpdateThingGroupsForThing where
  type
    AWSResponse UpdateThingGroupsForThing =
      UpdateThingGroupsForThingResponse
  request :: (Service -> Service)
-> UpdateThingGroupsForThing -> Request UpdateThingGroupsForThing
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateThingGroupsForThing
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateThingGroupsForThing)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateThingGroupsForThingResponse
UpdateThingGroupsForThingResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateThingGroupsForThing where
  hashWithSalt :: Int -> UpdateThingGroupsForThing -> Int
hashWithSalt Int
_salt UpdateThingGroupsForThing' {Maybe Bool
Maybe [Text]
Maybe Text
thingName :: Maybe Text
thingGroupsToRemove :: Maybe [Text]
thingGroupsToAdd :: Maybe [Text]
overrideDynamicGroups :: Maybe Bool
$sel:thingName:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Text
$sel:thingGroupsToRemove:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
$sel:thingGroupsToAdd:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
$sel:overrideDynamicGroups:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
overrideDynamicGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
thingGroupsToAdd
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
thingGroupsToRemove
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thingName

instance Prelude.NFData UpdateThingGroupsForThing where
  rnf :: UpdateThingGroupsForThing -> ()
rnf UpdateThingGroupsForThing' {Maybe Bool
Maybe [Text]
Maybe Text
thingName :: Maybe Text
thingGroupsToRemove :: Maybe [Text]
thingGroupsToAdd :: Maybe [Text]
overrideDynamicGroups :: Maybe Bool
$sel:thingName:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Text
$sel:thingGroupsToRemove:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
$sel:thingGroupsToAdd:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
$sel:overrideDynamicGroups:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
overrideDynamicGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
thingGroupsToAdd
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
thingGroupsToRemove
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thingName

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

instance Data.ToJSON UpdateThingGroupsForThing where
  toJSON :: UpdateThingGroupsForThing -> Value
toJSON UpdateThingGroupsForThing' {Maybe Bool
Maybe [Text]
Maybe Text
thingName :: Maybe Text
thingGroupsToRemove :: Maybe [Text]
thingGroupsToAdd :: Maybe [Text]
overrideDynamicGroups :: Maybe Bool
$sel:thingName:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Text
$sel:thingGroupsToRemove:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
$sel:thingGroupsToAdd:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe [Text]
$sel:overrideDynamicGroups:UpdateThingGroupsForThing' :: UpdateThingGroupsForThing -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"overrideDynamicGroups" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
overrideDynamicGroups,
            (Key
"thingGroupsToAdd" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
thingGroupsToAdd,
            (Key
"thingGroupsToRemove" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
thingGroupsToRemove,
            (Key
"thingName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
thingName
          ]
      )

instance Data.ToPath UpdateThingGroupsForThing where
  toPath :: UpdateThingGroupsForThing -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const
      ByteString
"/thing-groups/updateThingGroupsForThing"

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

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

-- |
-- Create a value of 'UpdateThingGroupsForThingResponse' 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:
--
-- 'httpStatus', 'updateThingGroupsForThingResponse_httpStatus' - The response's http status code.
newUpdateThingGroupsForThingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateThingGroupsForThingResponse
newUpdateThingGroupsForThingResponse :: Int -> UpdateThingGroupsForThingResponse
newUpdateThingGroupsForThingResponse Int
pHttpStatus_ =
  UpdateThingGroupsForThingResponse'
    { $sel:httpStatus:UpdateThingGroupsForThingResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    UpdateThingGroupsForThingResponse
  where
  rnf :: UpdateThingGroupsForThingResponse -> ()
rnf UpdateThingGroupsForThingResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateThingGroupsForThingResponse' :: UpdateThingGroupsForThingResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus