{-# 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.AlexaBusiness.ListSmartHomeAppliances
-- 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 all of the smart home appliances associated with a room.
--
-- This operation returns paginated results.
module Amazonka.AlexaBusiness.ListSmartHomeAppliances
  ( -- * Creating a Request
    ListSmartHomeAppliances (..),
    newListSmartHomeAppliances,

    -- * Request Lenses
    listSmartHomeAppliances_maxResults,
    listSmartHomeAppliances_nextToken,
    listSmartHomeAppliances_roomArn,

    -- * Destructuring the Response
    ListSmartHomeAppliancesResponse (..),
    newListSmartHomeAppliancesResponse,

    -- * Response Lenses
    listSmartHomeAppliancesResponse_nextToken,
    listSmartHomeAppliancesResponse_smartHomeAppliances,
    listSmartHomeAppliancesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListSmartHomeAppliances' smart constructor.
data ListSmartHomeAppliances = ListSmartHomeAppliances'
  { -- | The maximum number of appliances to be returned, per paginated calls.
    ListSmartHomeAppliances -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The tokens used for pagination.
    ListSmartHomeAppliances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The room that the appliances are associated with.
    ListSmartHomeAppliances -> Text
roomArn :: Prelude.Text
  }
  deriving (ListSmartHomeAppliances -> ListSmartHomeAppliances -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSmartHomeAppliances -> ListSmartHomeAppliances -> Bool
$c/= :: ListSmartHomeAppliances -> ListSmartHomeAppliances -> Bool
== :: ListSmartHomeAppliances -> ListSmartHomeAppliances -> Bool
$c== :: ListSmartHomeAppliances -> ListSmartHomeAppliances -> Bool
Prelude.Eq, ReadPrec [ListSmartHomeAppliances]
ReadPrec ListSmartHomeAppliances
Int -> ReadS ListSmartHomeAppliances
ReadS [ListSmartHomeAppliances]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSmartHomeAppliances]
$creadListPrec :: ReadPrec [ListSmartHomeAppliances]
readPrec :: ReadPrec ListSmartHomeAppliances
$creadPrec :: ReadPrec ListSmartHomeAppliances
readList :: ReadS [ListSmartHomeAppliances]
$creadList :: ReadS [ListSmartHomeAppliances]
readsPrec :: Int -> ReadS ListSmartHomeAppliances
$creadsPrec :: Int -> ReadS ListSmartHomeAppliances
Prelude.Read, Int -> ListSmartHomeAppliances -> ShowS
[ListSmartHomeAppliances] -> ShowS
ListSmartHomeAppliances -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSmartHomeAppliances] -> ShowS
$cshowList :: [ListSmartHomeAppliances] -> ShowS
show :: ListSmartHomeAppliances -> String
$cshow :: ListSmartHomeAppliances -> String
showsPrec :: Int -> ListSmartHomeAppliances -> ShowS
$cshowsPrec :: Int -> ListSmartHomeAppliances -> ShowS
Prelude.Show, forall x. Rep ListSmartHomeAppliances x -> ListSmartHomeAppliances
forall x. ListSmartHomeAppliances -> Rep ListSmartHomeAppliances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSmartHomeAppliances x -> ListSmartHomeAppliances
$cfrom :: forall x. ListSmartHomeAppliances -> Rep ListSmartHomeAppliances x
Prelude.Generic)

-- |
-- Create a value of 'ListSmartHomeAppliances' 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', 'listSmartHomeAppliances_maxResults' - The maximum number of appliances to be returned, per paginated calls.
--
-- 'nextToken', 'listSmartHomeAppliances_nextToken' - The tokens used for pagination.
--
-- 'roomArn', 'listSmartHomeAppliances_roomArn' - The room that the appliances are associated with.
newListSmartHomeAppliances ::
  -- | 'roomArn'
  Prelude.Text ->
  ListSmartHomeAppliances
newListSmartHomeAppliances :: Text -> ListSmartHomeAppliances
newListSmartHomeAppliances Text
pRoomArn_ =
  ListSmartHomeAppliances'
    { $sel:maxResults:ListSmartHomeAppliances' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSmartHomeAppliances' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:roomArn:ListSmartHomeAppliances' :: Text
roomArn = Text
pRoomArn_
    }

-- | The maximum number of appliances to be returned, per paginated calls.
listSmartHomeAppliances_maxResults :: Lens.Lens' ListSmartHomeAppliances (Prelude.Maybe Prelude.Natural)
listSmartHomeAppliances_maxResults :: Lens' ListSmartHomeAppliances (Maybe Natural)
listSmartHomeAppliances_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSmartHomeAppliances' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSmartHomeAppliances
s@ListSmartHomeAppliances' {} Maybe Natural
a -> ListSmartHomeAppliances
s {$sel:maxResults:ListSmartHomeAppliances' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSmartHomeAppliances)

-- | The tokens used for pagination.
listSmartHomeAppliances_nextToken :: Lens.Lens' ListSmartHomeAppliances (Prelude.Maybe Prelude.Text)
listSmartHomeAppliances_nextToken :: Lens' ListSmartHomeAppliances (Maybe Text)
listSmartHomeAppliances_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSmartHomeAppliances' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSmartHomeAppliances
s@ListSmartHomeAppliances' {} Maybe Text
a -> ListSmartHomeAppliances
s {$sel:nextToken:ListSmartHomeAppliances' :: Maybe Text
nextToken = Maybe Text
a} :: ListSmartHomeAppliances)

-- | The room that the appliances are associated with.
listSmartHomeAppliances_roomArn :: Lens.Lens' ListSmartHomeAppliances Prelude.Text
listSmartHomeAppliances_roomArn :: Lens' ListSmartHomeAppliances Text
listSmartHomeAppliances_roomArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSmartHomeAppliances' {Text
roomArn :: Text
$sel:roomArn:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Text
roomArn} -> Text
roomArn) (\s :: ListSmartHomeAppliances
s@ListSmartHomeAppliances' {} Text
a -> ListSmartHomeAppliances
s {$sel:roomArn:ListSmartHomeAppliances' :: Text
roomArn = Text
a} :: ListSmartHomeAppliances)

instance Core.AWSPager ListSmartHomeAppliances where
  page :: ListSmartHomeAppliances
-> AWSResponse ListSmartHomeAppliances
-> Maybe ListSmartHomeAppliances
page ListSmartHomeAppliances
rq AWSResponse ListSmartHomeAppliances
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSmartHomeAppliances
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSmartHomeAppliancesResponse (Maybe Text)
listSmartHomeAppliancesResponse_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 ListSmartHomeAppliances
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSmartHomeAppliancesResponse (Maybe [SmartHomeAppliance])
listSmartHomeAppliancesResponse_smartHomeAppliances
            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.$ ListSmartHomeAppliances
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSmartHomeAppliances (Maybe Text)
listSmartHomeAppliances_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSmartHomeAppliances
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSmartHomeAppliancesResponse (Maybe Text)
listSmartHomeAppliancesResponse_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 ListSmartHomeAppliances where
  type
    AWSResponse ListSmartHomeAppliances =
      ListSmartHomeAppliancesResponse
  request :: (Service -> Service)
-> ListSmartHomeAppliances -> Request ListSmartHomeAppliances
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListSmartHomeAppliances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSmartHomeAppliances)))
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 [SmartHomeAppliance]
-> Int
-> ListSmartHomeAppliancesResponse
ListSmartHomeAppliancesResponse'
            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
"SmartHomeAppliances"
                            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 ListSmartHomeAppliances where
  hashWithSalt :: Int -> ListSmartHomeAppliances -> Int
hashWithSalt Int
_salt ListSmartHomeAppliances' {Maybe Natural
Maybe Text
Text
roomArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:roomArn:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Text
$sel:nextToken:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Maybe Text
$sel:maxResults:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> 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` Text
roomArn

instance Prelude.NFData ListSmartHomeAppliances where
  rnf :: ListSmartHomeAppliances -> ()
rnf ListSmartHomeAppliances' {Maybe Natural
Maybe Text
Text
roomArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:roomArn:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Text
$sel:nextToken:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Maybe Text
$sel:maxResults:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> 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 Text
roomArn

instance Data.ToHeaders ListSmartHomeAppliances where
  toHeaders :: ListSmartHomeAppliances -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AlexaForBusiness.ListSmartHomeAppliances" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListSmartHomeAppliances where
  toJSON :: ListSmartHomeAppliances -> Value
toJSON ListSmartHomeAppliances' {Maybe Natural
Maybe Text
Text
roomArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:roomArn:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Text
$sel:nextToken:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Maybe Text
$sel:maxResults:ListSmartHomeAppliances' :: ListSmartHomeAppliances -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" 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 Natural
maxResults,
            (Key
"NextToken" 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
nextToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"RoomArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roomArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'ListSmartHomeAppliancesResponse' 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', 'listSmartHomeAppliancesResponse_nextToken' - The tokens used for pagination.
--
-- 'smartHomeAppliances', 'listSmartHomeAppliancesResponse_smartHomeAppliances' - The smart home appliances.
--
-- 'httpStatus', 'listSmartHomeAppliancesResponse_httpStatus' - The response's http status code.
newListSmartHomeAppliancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSmartHomeAppliancesResponse
newListSmartHomeAppliancesResponse :: Int -> ListSmartHomeAppliancesResponse
newListSmartHomeAppliancesResponse Int
pHttpStatus_ =
  ListSmartHomeAppliancesResponse'
    { $sel:nextToken:ListSmartHomeAppliancesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:smartHomeAppliances:ListSmartHomeAppliancesResponse' :: Maybe [SmartHomeAppliance]
smartHomeAppliances = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSmartHomeAppliancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The tokens used for pagination.
listSmartHomeAppliancesResponse_nextToken :: Lens.Lens' ListSmartHomeAppliancesResponse (Prelude.Maybe Prelude.Text)
listSmartHomeAppliancesResponse_nextToken :: Lens' ListSmartHomeAppliancesResponse (Maybe Text)
listSmartHomeAppliancesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSmartHomeAppliancesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSmartHomeAppliancesResponse' :: ListSmartHomeAppliancesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSmartHomeAppliancesResponse
s@ListSmartHomeAppliancesResponse' {} Maybe Text
a -> ListSmartHomeAppliancesResponse
s {$sel:nextToken:ListSmartHomeAppliancesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSmartHomeAppliancesResponse)

-- | The smart home appliances.
listSmartHomeAppliancesResponse_smartHomeAppliances :: Lens.Lens' ListSmartHomeAppliancesResponse (Prelude.Maybe [SmartHomeAppliance])
listSmartHomeAppliancesResponse_smartHomeAppliances :: Lens' ListSmartHomeAppliancesResponse (Maybe [SmartHomeAppliance])
listSmartHomeAppliancesResponse_smartHomeAppliances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSmartHomeAppliancesResponse' {Maybe [SmartHomeAppliance]
smartHomeAppliances :: Maybe [SmartHomeAppliance]
$sel:smartHomeAppliances:ListSmartHomeAppliancesResponse' :: ListSmartHomeAppliancesResponse -> Maybe [SmartHomeAppliance]
smartHomeAppliances} -> Maybe [SmartHomeAppliance]
smartHomeAppliances) (\s :: ListSmartHomeAppliancesResponse
s@ListSmartHomeAppliancesResponse' {} Maybe [SmartHomeAppliance]
a -> ListSmartHomeAppliancesResponse
s {$sel:smartHomeAppliances:ListSmartHomeAppliancesResponse' :: Maybe [SmartHomeAppliance]
smartHomeAppliances = Maybe [SmartHomeAppliance]
a} :: ListSmartHomeAppliancesResponse) 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.
listSmartHomeAppliancesResponse_httpStatus :: Lens.Lens' ListSmartHomeAppliancesResponse Prelude.Int
listSmartHomeAppliancesResponse_httpStatus :: Lens' ListSmartHomeAppliancesResponse Int
listSmartHomeAppliancesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSmartHomeAppliancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListSmartHomeAppliancesResponse' :: ListSmartHomeAppliancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListSmartHomeAppliancesResponse
s@ListSmartHomeAppliancesResponse' {} Int
a -> ListSmartHomeAppliancesResponse
s {$sel:httpStatus:ListSmartHomeAppliancesResponse' :: Int
httpStatus = Int
a} :: ListSmartHomeAppliancesResponse)

instance
  Prelude.NFData
    ListSmartHomeAppliancesResponse
  where
  rnf :: ListSmartHomeAppliancesResponse -> ()
rnf ListSmartHomeAppliancesResponse' {Int
Maybe [SmartHomeAppliance]
Maybe Text
httpStatus :: Int
smartHomeAppliances :: Maybe [SmartHomeAppliance]
nextToken :: Maybe Text
$sel:httpStatus:ListSmartHomeAppliancesResponse' :: ListSmartHomeAppliancesResponse -> Int
$sel:smartHomeAppliances:ListSmartHomeAppliancesResponse' :: ListSmartHomeAppliancesResponse -> Maybe [SmartHomeAppliance]
$sel:nextToken:ListSmartHomeAppliancesResponse' :: ListSmartHomeAppliancesResponse -> 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 [SmartHomeAppliance]
smartHomeAppliances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus