{-# 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.ListThingsInThingGroup
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the things in the specified group.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListThingsInThingGroup>
-- action.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListThingsInThingGroup
  ( -- * Creating a Request
    ListThingsInThingGroup (..),
    newListThingsInThingGroup,

    -- * Request Lenses
    listThingsInThingGroup_maxResults,
    listThingsInThingGroup_nextToken,
    listThingsInThingGroup_recursive,
    listThingsInThingGroup_thingGroupName,

    -- * Destructuring the Response
    ListThingsInThingGroupResponse (..),
    newListThingsInThingGroupResponse,

    -- * Response Lenses
    listThingsInThingGroupResponse_nextToken,
    listThingsInThingGroupResponse_things,
    listThingsInThingGroupResponse_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:/ 'newListThingsInThingGroup' smart constructor.
data ListThingsInThingGroup = ListThingsInThingGroup'
  { -- | The maximum number of results to return at one time.
    ListThingsInThingGroup -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | To retrieve the next set of results, the @nextToken@ value from a
    -- previous response; otherwise __null__ to receive the first set of
    -- results.
    ListThingsInThingGroup -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | When true, list things in this thing group and in all child groups as
    -- well.
    ListThingsInThingGroup -> Maybe Bool
recursive :: Prelude.Maybe Prelude.Bool,
    -- | The thing group name.
    ListThingsInThingGroup -> Text
thingGroupName :: Prelude.Text
  }
  deriving (ListThingsInThingGroup -> ListThingsInThingGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListThingsInThingGroup -> ListThingsInThingGroup -> Bool
$c/= :: ListThingsInThingGroup -> ListThingsInThingGroup -> Bool
== :: ListThingsInThingGroup -> ListThingsInThingGroup -> Bool
$c== :: ListThingsInThingGroup -> ListThingsInThingGroup -> Bool
Prelude.Eq, ReadPrec [ListThingsInThingGroup]
ReadPrec ListThingsInThingGroup
Int -> ReadS ListThingsInThingGroup
ReadS [ListThingsInThingGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListThingsInThingGroup]
$creadListPrec :: ReadPrec [ListThingsInThingGroup]
readPrec :: ReadPrec ListThingsInThingGroup
$creadPrec :: ReadPrec ListThingsInThingGroup
readList :: ReadS [ListThingsInThingGroup]
$creadList :: ReadS [ListThingsInThingGroup]
readsPrec :: Int -> ReadS ListThingsInThingGroup
$creadsPrec :: Int -> ReadS ListThingsInThingGroup
Prelude.Read, Int -> ListThingsInThingGroup -> ShowS
[ListThingsInThingGroup] -> ShowS
ListThingsInThingGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListThingsInThingGroup] -> ShowS
$cshowList :: [ListThingsInThingGroup] -> ShowS
show :: ListThingsInThingGroup -> String
$cshow :: ListThingsInThingGroup -> String
showsPrec :: Int -> ListThingsInThingGroup -> ShowS
$cshowsPrec :: Int -> ListThingsInThingGroup -> ShowS
Prelude.Show, forall x. Rep ListThingsInThingGroup x -> ListThingsInThingGroup
forall x. ListThingsInThingGroup -> Rep ListThingsInThingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListThingsInThingGroup x -> ListThingsInThingGroup
$cfrom :: forall x. ListThingsInThingGroup -> Rep ListThingsInThingGroup x
Prelude.Generic)

-- |
-- Create a value of 'ListThingsInThingGroup' 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:
--
-- 'maxResults', 'listThingsInThingGroup_maxResults' - The maximum number of results to return at one time.
--
-- 'nextToken', 'listThingsInThingGroup_nextToken' - To retrieve the next set of results, the @nextToken@ value from a
-- previous response; otherwise __null__ to receive the first set of
-- results.
--
-- 'recursive', 'listThingsInThingGroup_recursive' - When true, list things in this thing group and in all child groups as
-- well.
--
-- 'thingGroupName', 'listThingsInThingGroup_thingGroupName' - The thing group name.
newListThingsInThingGroup ::
  -- | 'thingGroupName'
  Prelude.Text ->
  ListThingsInThingGroup
newListThingsInThingGroup :: Text -> ListThingsInThingGroup
newListThingsInThingGroup Text
pThingGroupName_ =
  ListThingsInThingGroup'
    { $sel:maxResults:ListThingsInThingGroup' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListThingsInThingGroup' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:recursive:ListThingsInThingGroup' :: Maybe Bool
recursive = forall a. Maybe a
Prelude.Nothing,
      $sel:thingGroupName:ListThingsInThingGroup' :: Text
thingGroupName = Text
pThingGroupName_
    }

-- | The maximum number of results to return at one time.
listThingsInThingGroup_maxResults :: Lens.Lens' ListThingsInThingGroup (Prelude.Maybe Prelude.Natural)
listThingsInThingGroup_maxResults :: Lens' ListThingsInThingGroup (Maybe Natural)
listThingsInThingGroup_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroup' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListThingsInThingGroup
s@ListThingsInThingGroup' {} Maybe Natural
a -> ListThingsInThingGroup
s {$sel:maxResults:ListThingsInThingGroup' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListThingsInThingGroup)

-- | To retrieve the next set of results, the @nextToken@ value from a
-- previous response; otherwise __null__ to receive the first set of
-- results.
listThingsInThingGroup_nextToken :: Lens.Lens' ListThingsInThingGroup (Prelude.Maybe Prelude.Text)
listThingsInThingGroup_nextToken :: Lens' ListThingsInThingGroup (Maybe Text)
listThingsInThingGroup_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroup' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListThingsInThingGroup
s@ListThingsInThingGroup' {} Maybe Text
a -> ListThingsInThingGroup
s {$sel:nextToken:ListThingsInThingGroup' :: Maybe Text
nextToken = Maybe Text
a} :: ListThingsInThingGroup)

-- | When true, list things in this thing group and in all child groups as
-- well.
listThingsInThingGroup_recursive :: Lens.Lens' ListThingsInThingGroup (Prelude.Maybe Prelude.Bool)
listThingsInThingGroup_recursive :: Lens' ListThingsInThingGroup (Maybe Bool)
listThingsInThingGroup_recursive = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroup' {Maybe Bool
recursive :: Maybe Bool
$sel:recursive:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Bool
recursive} -> Maybe Bool
recursive) (\s :: ListThingsInThingGroup
s@ListThingsInThingGroup' {} Maybe Bool
a -> ListThingsInThingGroup
s {$sel:recursive:ListThingsInThingGroup' :: Maybe Bool
recursive = Maybe Bool
a} :: ListThingsInThingGroup)

-- | The thing group name.
listThingsInThingGroup_thingGroupName :: Lens.Lens' ListThingsInThingGroup Prelude.Text
listThingsInThingGroup_thingGroupName :: Lens' ListThingsInThingGroup Text
listThingsInThingGroup_thingGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroup' {Text
thingGroupName :: Text
$sel:thingGroupName:ListThingsInThingGroup' :: ListThingsInThingGroup -> Text
thingGroupName} -> Text
thingGroupName) (\s :: ListThingsInThingGroup
s@ListThingsInThingGroup' {} Text
a -> ListThingsInThingGroup
s {$sel:thingGroupName:ListThingsInThingGroup' :: Text
thingGroupName = Text
a} :: ListThingsInThingGroup)

instance Core.AWSPager ListThingsInThingGroup where
  page :: ListThingsInThingGroup
-> AWSResponse ListThingsInThingGroup
-> Maybe ListThingsInThingGroup
page ListThingsInThingGroup
rq AWSResponse ListThingsInThingGroup
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListThingsInThingGroup
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListThingsInThingGroupResponse (Maybe Text)
listThingsInThingGroupResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListThingsInThingGroup
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListThingsInThingGroupResponse (Maybe [Text])
listThingsInThingGroupResponse_things
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListThingsInThingGroup
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListThingsInThingGroup (Maybe Text)
listThingsInThingGroup_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListThingsInThingGroup
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListThingsInThingGroupResponse (Maybe Text)
listThingsInThingGroupResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListThingsInThingGroup where
  type
    AWSResponse ListThingsInThingGroup =
      ListThingsInThingGroupResponse
  request :: (Service -> Service)
-> ListThingsInThingGroup -> Request ListThingsInThingGroup
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListThingsInThingGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListThingsInThingGroup)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Maybe [Text] -> Int -> ListThingsInThingGroupResponse
ListThingsInThingGroupResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"things" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => 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 ListThingsInThingGroup where
  hashWithSalt :: Int -> ListThingsInThingGroup -> Int
hashWithSalt Int
_salt ListThingsInThingGroup' {Maybe Bool
Maybe Natural
Maybe Text
Text
thingGroupName :: Text
recursive :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:thingGroupName:ListThingsInThingGroup' :: ListThingsInThingGroup -> Text
$sel:recursive:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Bool
$sel:nextToken:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Text
$sel:maxResults:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
recursive
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
thingGroupName

instance Prelude.NFData ListThingsInThingGroup where
  rnf :: ListThingsInThingGroup -> ()
rnf ListThingsInThingGroup' {Maybe Bool
Maybe Natural
Maybe Text
Text
thingGroupName :: Text
recursive :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:thingGroupName:ListThingsInThingGroup' :: ListThingsInThingGroup -> Text
$sel:recursive:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Bool
$sel:nextToken:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Text
$sel:maxResults:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
recursive
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
thingGroupName

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

instance Data.ToPath ListThingsInThingGroup where
  toPath :: ListThingsInThingGroup -> ByteString
toPath ListThingsInThingGroup' {Maybe Bool
Maybe Natural
Maybe Text
Text
thingGroupName :: Text
recursive :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:thingGroupName:ListThingsInThingGroup' :: ListThingsInThingGroup -> Text
$sel:recursive:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Bool
$sel:nextToken:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Text
$sel:maxResults:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/thing-groups/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
thingGroupName,
        ByteString
"/things"
      ]

instance Data.ToQuery ListThingsInThingGroup where
  toQuery :: ListThingsInThingGroup -> QueryString
toQuery ListThingsInThingGroup' {Maybe Bool
Maybe Natural
Maybe Text
Text
thingGroupName :: Text
recursive :: Maybe Bool
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:thingGroupName:ListThingsInThingGroup' :: ListThingsInThingGroup -> Text
$sel:recursive:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Bool
$sel:nextToken:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Text
$sel:maxResults:ListThingsInThingGroup' :: ListThingsInThingGroup -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"recursive" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
recursive
      ]

-- | /See:/ 'newListThingsInThingGroupResponse' smart constructor.
data ListThingsInThingGroupResponse = ListThingsInThingGroupResponse'
  { -- | The token to use to get the next set of results, or __null__ if there
    -- are no additional results.
    ListThingsInThingGroupResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The things in the specified thing group.
    ListThingsInThingGroupResponse -> Maybe [Text]
things :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ListThingsInThingGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListThingsInThingGroupResponse
-> ListThingsInThingGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListThingsInThingGroupResponse
-> ListThingsInThingGroupResponse -> Bool
$c/= :: ListThingsInThingGroupResponse
-> ListThingsInThingGroupResponse -> Bool
== :: ListThingsInThingGroupResponse
-> ListThingsInThingGroupResponse -> Bool
$c== :: ListThingsInThingGroupResponse
-> ListThingsInThingGroupResponse -> Bool
Prelude.Eq, ReadPrec [ListThingsInThingGroupResponse]
ReadPrec ListThingsInThingGroupResponse
Int -> ReadS ListThingsInThingGroupResponse
ReadS [ListThingsInThingGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListThingsInThingGroupResponse]
$creadListPrec :: ReadPrec [ListThingsInThingGroupResponse]
readPrec :: ReadPrec ListThingsInThingGroupResponse
$creadPrec :: ReadPrec ListThingsInThingGroupResponse
readList :: ReadS [ListThingsInThingGroupResponse]
$creadList :: ReadS [ListThingsInThingGroupResponse]
readsPrec :: Int -> ReadS ListThingsInThingGroupResponse
$creadsPrec :: Int -> ReadS ListThingsInThingGroupResponse
Prelude.Read, Int -> ListThingsInThingGroupResponse -> ShowS
[ListThingsInThingGroupResponse] -> ShowS
ListThingsInThingGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListThingsInThingGroupResponse] -> ShowS
$cshowList :: [ListThingsInThingGroupResponse] -> ShowS
show :: ListThingsInThingGroupResponse -> String
$cshow :: ListThingsInThingGroupResponse -> String
showsPrec :: Int -> ListThingsInThingGroupResponse -> ShowS
$cshowsPrec :: Int -> ListThingsInThingGroupResponse -> ShowS
Prelude.Show, forall x.
Rep ListThingsInThingGroupResponse x
-> ListThingsInThingGroupResponse
forall x.
ListThingsInThingGroupResponse
-> Rep ListThingsInThingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListThingsInThingGroupResponse x
-> ListThingsInThingGroupResponse
$cfrom :: forall x.
ListThingsInThingGroupResponse
-> Rep ListThingsInThingGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListThingsInThingGroupResponse' 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:
--
-- 'nextToken', 'listThingsInThingGroupResponse_nextToken' - The token to use to get the next set of results, or __null__ if there
-- are no additional results.
--
-- 'things', 'listThingsInThingGroupResponse_things' - The things in the specified thing group.
--
-- 'httpStatus', 'listThingsInThingGroupResponse_httpStatus' - The response's http status code.
newListThingsInThingGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListThingsInThingGroupResponse
newListThingsInThingGroupResponse :: Int -> ListThingsInThingGroupResponse
newListThingsInThingGroupResponse Int
pHttpStatus_ =
  ListThingsInThingGroupResponse'
    { $sel:nextToken:ListThingsInThingGroupResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:things:ListThingsInThingGroupResponse' :: Maybe [Text]
things = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListThingsInThingGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to get the next set of results, or __null__ if there
-- are no additional results.
listThingsInThingGroupResponse_nextToken :: Lens.Lens' ListThingsInThingGroupResponse (Prelude.Maybe Prelude.Text)
listThingsInThingGroupResponse_nextToken :: Lens' ListThingsInThingGroupResponse (Maybe Text)
listThingsInThingGroupResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroupResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListThingsInThingGroupResponse' :: ListThingsInThingGroupResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListThingsInThingGroupResponse
s@ListThingsInThingGroupResponse' {} Maybe Text
a -> ListThingsInThingGroupResponse
s {$sel:nextToken:ListThingsInThingGroupResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListThingsInThingGroupResponse)

-- | The things in the specified thing group.
listThingsInThingGroupResponse_things :: Lens.Lens' ListThingsInThingGroupResponse (Prelude.Maybe [Prelude.Text])
listThingsInThingGroupResponse_things :: Lens' ListThingsInThingGroupResponse (Maybe [Text])
listThingsInThingGroupResponse_things = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroupResponse' {Maybe [Text]
things :: Maybe [Text]
$sel:things:ListThingsInThingGroupResponse' :: ListThingsInThingGroupResponse -> Maybe [Text]
things} -> Maybe [Text]
things) (\s :: ListThingsInThingGroupResponse
s@ListThingsInThingGroupResponse' {} Maybe [Text]
a -> ListThingsInThingGroupResponse
s {$sel:things:ListThingsInThingGroupResponse' :: Maybe [Text]
things = Maybe [Text]
a} :: ListThingsInThingGroupResponse) 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 response's http status code.
listThingsInThingGroupResponse_httpStatus :: Lens.Lens' ListThingsInThingGroupResponse Prelude.Int
listThingsInThingGroupResponse_httpStatus :: Lens' ListThingsInThingGroupResponse Int
listThingsInThingGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListThingsInThingGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListThingsInThingGroupResponse' :: ListThingsInThingGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListThingsInThingGroupResponse
s@ListThingsInThingGroupResponse' {} Int
a -> ListThingsInThingGroupResponse
s {$sel:httpStatus:ListThingsInThingGroupResponse' :: Int
httpStatus = Int
a} :: ListThingsInThingGroupResponse)

instance
  Prelude.NFData
    ListThingsInThingGroupResponse
  where
  rnf :: ListThingsInThingGroupResponse -> ()
rnf ListThingsInThingGroupResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
things :: Maybe [Text]
nextToken :: Maybe Text
$sel:httpStatus:ListThingsInThingGroupResponse' :: ListThingsInThingGroupResponse -> Int
$sel:things:ListThingsInThingGroupResponse' :: ListThingsInThingGroupResponse -> Maybe [Text]
$sel:nextToken:ListThingsInThingGroupResponse' :: ListThingsInThingGroupResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
things
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus