{-# 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.SearchProfiles
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Searches room profiles and lists the ones that meet a set of filter
-- criteria.
--
-- This operation returns paginated results.
module Amazonka.AlexaBusiness.SearchProfiles
  ( -- * Creating a Request
    SearchProfiles (..),
    newSearchProfiles,

    -- * Request Lenses
    searchProfiles_filters,
    searchProfiles_maxResults,
    searchProfiles_nextToken,
    searchProfiles_sortCriteria,

    -- * Destructuring the Response
    SearchProfilesResponse (..),
    newSearchProfilesResponse,

    -- * Response Lenses
    searchProfilesResponse_nextToken,
    searchProfilesResponse_profiles,
    searchProfilesResponse_totalCount,
    searchProfilesResponse_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:/ 'newSearchProfiles' smart constructor.
data SearchProfiles = SearchProfiles'
  { -- | The filters to use to list a specified set of room profiles. Supported
    -- filter keys are ProfileName and Address. Required.
    SearchProfiles -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to include in the response. If more
    -- results exist than the specified @MaxResults@ value, a token is included
    -- in the response so that the remaining results can be retrieved.
    SearchProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | An optional token returned from a prior request. Use this token for
    -- pagination of results from this action. If this parameter is specified,
    -- the response includes only results beyond the token, up to the value
    -- specified by @MaxResults@.
    SearchProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The sort order to use in listing the specified set of room profiles.
    -- Supported sort keys are ProfileName and Address.
    SearchProfiles -> Maybe [Sort]
sortCriteria :: Prelude.Maybe [Sort]
  }
  deriving (SearchProfiles -> SearchProfiles -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchProfiles -> SearchProfiles -> Bool
$c/= :: SearchProfiles -> SearchProfiles -> Bool
== :: SearchProfiles -> SearchProfiles -> Bool
$c== :: SearchProfiles -> SearchProfiles -> Bool
Prelude.Eq, ReadPrec [SearchProfiles]
ReadPrec SearchProfiles
Int -> ReadS SearchProfiles
ReadS [SearchProfiles]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchProfiles]
$creadListPrec :: ReadPrec [SearchProfiles]
readPrec :: ReadPrec SearchProfiles
$creadPrec :: ReadPrec SearchProfiles
readList :: ReadS [SearchProfiles]
$creadList :: ReadS [SearchProfiles]
readsPrec :: Int -> ReadS SearchProfiles
$creadsPrec :: Int -> ReadS SearchProfiles
Prelude.Read, Int -> SearchProfiles -> ShowS
[SearchProfiles] -> ShowS
SearchProfiles -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchProfiles] -> ShowS
$cshowList :: [SearchProfiles] -> ShowS
show :: SearchProfiles -> String
$cshow :: SearchProfiles -> String
showsPrec :: Int -> SearchProfiles -> ShowS
$cshowsPrec :: Int -> SearchProfiles -> ShowS
Prelude.Show, forall x. Rep SearchProfiles x -> SearchProfiles
forall x. SearchProfiles -> Rep SearchProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchProfiles x -> SearchProfiles
$cfrom :: forall x. SearchProfiles -> Rep SearchProfiles x
Prelude.Generic)

-- |
-- Create a value of 'SearchProfiles' 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:
--
-- 'filters', 'searchProfiles_filters' - The filters to use to list a specified set of room profiles. Supported
-- filter keys are ProfileName and Address. Required.
--
-- 'maxResults', 'searchProfiles_maxResults' - The maximum number of results to include in the response. If more
-- results exist than the specified @MaxResults@ value, a token is included
-- in the response so that the remaining results can be retrieved.
--
-- 'nextToken', 'searchProfiles_nextToken' - An optional token returned from a prior request. Use this token for
-- pagination of results from this action. If this parameter is specified,
-- the response includes only results beyond the token, up to the value
-- specified by @MaxResults@.
--
-- 'sortCriteria', 'searchProfiles_sortCriteria' - The sort order to use in listing the specified set of room profiles.
-- Supported sort keys are ProfileName and Address.
newSearchProfiles ::
  SearchProfiles
newSearchProfiles :: SearchProfiles
newSearchProfiles =
  SearchProfiles'
    { $sel:filters:SearchProfiles' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:SearchProfiles' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SearchProfiles' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortCriteria:SearchProfiles' :: Maybe [Sort]
sortCriteria = forall a. Maybe a
Prelude.Nothing
    }

-- | The filters to use to list a specified set of room profiles. Supported
-- filter keys are ProfileName and Address. Required.
searchProfiles_filters :: Lens.Lens' SearchProfiles (Prelude.Maybe [Filter])
searchProfiles_filters :: Lens' SearchProfiles (Maybe [Filter])
searchProfiles_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfiles' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:SearchProfiles' :: SearchProfiles -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: SearchProfiles
s@SearchProfiles' {} Maybe [Filter]
a -> SearchProfiles
s {$sel:filters:SearchProfiles' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: SearchProfiles) 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 maximum number of results to include in the response. If more
-- results exist than the specified @MaxResults@ value, a token is included
-- in the response so that the remaining results can be retrieved.
searchProfiles_maxResults :: Lens.Lens' SearchProfiles (Prelude.Maybe Prelude.Natural)
searchProfiles_maxResults :: Lens' SearchProfiles (Maybe Natural)
searchProfiles_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfiles' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:SearchProfiles' :: SearchProfiles -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: SearchProfiles
s@SearchProfiles' {} Maybe Natural
a -> SearchProfiles
s {$sel:maxResults:SearchProfiles' :: Maybe Natural
maxResults = Maybe Natural
a} :: SearchProfiles)

-- | An optional token returned from a prior request. Use this token for
-- pagination of results from this action. If this parameter is specified,
-- the response includes only results beyond the token, up to the value
-- specified by @MaxResults@.
searchProfiles_nextToken :: Lens.Lens' SearchProfiles (Prelude.Maybe Prelude.Text)
searchProfiles_nextToken :: Lens' SearchProfiles (Maybe Text)
searchProfiles_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchProfiles' :: SearchProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchProfiles
s@SearchProfiles' {} Maybe Text
a -> SearchProfiles
s {$sel:nextToken:SearchProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: SearchProfiles)

-- | The sort order to use in listing the specified set of room profiles.
-- Supported sort keys are ProfileName and Address.
searchProfiles_sortCriteria :: Lens.Lens' SearchProfiles (Prelude.Maybe [Sort])
searchProfiles_sortCriteria :: Lens' SearchProfiles (Maybe [Sort])
searchProfiles_sortCriteria = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfiles' {Maybe [Sort]
sortCriteria :: Maybe [Sort]
$sel:sortCriteria:SearchProfiles' :: SearchProfiles -> Maybe [Sort]
sortCriteria} -> Maybe [Sort]
sortCriteria) (\s :: SearchProfiles
s@SearchProfiles' {} Maybe [Sort]
a -> SearchProfiles
s {$sel:sortCriteria:SearchProfiles' :: Maybe [Sort]
sortCriteria = Maybe [Sort]
a} :: SearchProfiles) 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

instance Core.AWSPager SearchProfiles where
  page :: SearchProfiles
-> AWSResponse SearchProfiles -> Maybe SearchProfiles
page SearchProfiles
rq AWSResponse SearchProfiles
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse SearchProfiles
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchProfilesResponse (Maybe Text)
searchProfilesResponse_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 SearchProfiles
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchProfilesResponse (Maybe [ProfileData])
searchProfilesResponse_profiles
            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.$ SearchProfiles
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' SearchProfiles (Maybe Text)
searchProfiles_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse SearchProfiles
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' SearchProfilesResponse (Maybe Text)
searchProfilesResponse_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 SearchProfiles where
  type
    AWSResponse SearchProfiles =
      SearchProfilesResponse
  request :: (Service -> Service) -> SearchProfiles -> Request SearchProfiles
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 SearchProfiles
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SearchProfiles)))
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 [ProfileData]
-> Maybe Int
-> Int
-> SearchProfilesResponse
SearchProfilesResponse'
            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
"Profiles" 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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TotalCount")
            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 SearchProfiles where
  hashWithSalt :: Int -> SearchProfiles -> Int
hashWithSalt Int
_salt SearchProfiles' {Maybe Natural
Maybe [Filter]
Maybe [Sort]
Maybe Text
sortCriteria :: Maybe [Sort]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:sortCriteria:SearchProfiles' :: SearchProfiles -> Maybe [Sort]
$sel:nextToken:SearchProfiles' :: SearchProfiles -> Maybe Text
$sel:maxResults:SearchProfiles' :: SearchProfiles -> Maybe Natural
$sel:filters:SearchProfiles' :: SearchProfiles -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      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 [Sort]
sortCriteria

instance Prelude.NFData SearchProfiles where
  rnf :: SearchProfiles -> ()
rnf SearchProfiles' {Maybe Natural
Maybe [Filter]
Maybe [Sort]
Maybe Text
sortCriteria :: Maybe [Sort]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:sortCriteria:SearchProfiles' :: SearchProfiles -> Maybe [Sort]
$sel:nextToken:SearchProfiles' :: SearchProfiles -> Maybe Text
$sel:maxResults:SearchProfiles' :: SearchProfiles -> Maybe Natural
$sel:filters:SearchProfiles' :: SearchProfiles -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [Sort]
sortCriteria

instance Data.ToHeaders SearchProfiles where
  toHeaders :: SearchProfiles -> 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.SearchProfiles" ::
                          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 SearchProfiles where
  toJSON :: SearchProfiles -> Value
toJSON SearchProfiles' {Maybe Natural
Maybe [Filter]
Maybe [Sort]
Maybe Text
sortCriteria :: Maybe [Sort]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:sortCriteria:SearchProfiles' :: SearchProfiles -> Maybe [Sort]
$sel:nextToken:SearchProfiles' :: SearchProfiles -> Maybe Text
$sel:maxResults:SearchProfiles' :: SearchProfiles -> Maybe Natural
$sel:filters:SearchProfiles' :: SearchProfiles -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" 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 [Filter]
filters,
            (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,
            (Key
"SortCriteria" 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 [Sort]
sortCriteria
          ]
      )

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

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

-- | /See:/ 'newSearchProfilesResponse' smart constructor.
data SearchProfilesResponse = SearchProfilesResponse'
  { -- | The token returned to indicate that there is more data available.
    SearchProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The profiles that meet the specified set of filter criteria, in sort
    -- order.
    SearchProfilesResponse -> Maybe [ProfileData]
profiles :: Prelude.Maybe [ProfileData],
    -- | The total number of room profiles returned.
    SearchProfilesResponse -> Maybe Int
totalCount :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    SearchProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SearchProfilesResponse -> SearchProfilesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchProfilesResponse -> SearchProfilesResponse -> Bool
$c/= :: SearchProfilesResponse -> SearchProfilesResponse -> Bool
== :: SearchProfilesResponse -> SearchProfilesResponse -> Bool
$c== :: SearchProfilesResponse -> SearchProfilesResponse -> Bool
Prelude.Eq, ReadPrec [SearchProfilesResponse]
ReadPrec SearchProfilesResponse
Int -> ReadS SearchProfilesResponse
ReadS [SearchProfilesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchProfilesResponse]
$creadListPrec :: ReadPrec [SearchProfilesResponse]
readPrec :: ReadPrec SearchProfilesResponse
$creadPrec :: ReadPrec SearchProfilesResponse
readList :: ReadS [SearchProfilesResponse]
$creadList :: ReadS [SearchProfilesResponse]
readsPrec :: Int -> ReadS SearchProfilesResponse
$creadsPrec :: Int -> ReadS SearchProfilesResponse
Prelude.Read, Int -> SearchProfilesResponse -> ShowS
[SearchProfilesResponse] -> ShowS
SearchProfilesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchProfilesResponse] -> ShowS
$cshowList :: [SearchProfilesResponse] -> ShowS
show :: SearchProfilesResponse -> String
$cshow :: SearchProfilesResponse -> String
showsPrec :: Int -> SearchProfilesResponse -> ShowS
$cshowsPrec :: Int -> SearchProfilesResponse -> ShowS
Prelude.Show, forall x. Rep SearchProfilesResponse x -> SearchProfilesResponse
forall x. SearchProfilesResponse -> Rep SearchProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchProfilesResponse x -> SearchProfilesResponse
$cfrom :: forall x. SearchProfilesResponse -> Rep SearchProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'SearchProfilesResponse' 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', 'searchProfilesResponse_nextToken' - The token returned to indicate that there is more data available.
--
-- 'profiles', 'searchProfilesResponse_profiles' - The profiles that meet the specified set of filter criteria, in sort
-- order.
--
-- 'totalCount', 'searchProfilesResponse_totalCount' - The total number of room profiles returned.
--
-- 'httpStatus', 'searchProfilesResponse_httpStatus' - The response's http status code.
newSearchProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SearchProfilesResponse
newSearchProfilesResponse :: Int -> SearchProfilesResponse
newSearchProfilesResponse Int
pHttpStatus_ =
  SearchProfilesResponse'
    { $sel:nextToken:SearchProfilesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:profiles:SearchProfilesResponse' :: Maybe [ProfileData]
profiles = forall a. Maybe a
Prelude.Nothing,
      $sel:totalCount:SearchProfilesResponse' :: Maybe Int
totalCount = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SearchProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token returned to indicate that there is more data available.
searchProfilesResponse_nextToken :: Lens.Lens' SearchProfilesResponse (Prelude.Maybe Prelude.Text)
searchProfilesResponse_nextToken :: Lens' SearchProfilesResponse (Maybe Text)
searchProfilesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchProfilesResponse' :: SearchProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchProfilesResponse
s@SearchProfilesResponse' {} Maybe Text
a -> SearchProfilesResponse
s {$sel:nextToken:SearchProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SearchProfilesResponse)

-- | The profiles that meet the specified set of filter criteria, in sort
-- order.
searchProfilesResponse_profiles :: Lens.Lens' SearchProfilesResponse (Prelude.Maybe [ProfileData])
searchProfilesResponse_profiles :: Lens' SearchProfilesResponse (Maybe [ProfileData])
searchProfilesResponse_profiles = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfilesResponse' {Maybe [ProfileData]
profiles :: Maybe [ProfileData]
$sel:profiles:SearchProfilesResponse' :: SearchProfilesResponse -> Maybe [ProfileData]
profiles} -> Maybe [ProfileData]
profiles) (\s :: SearchProfilesResponse
s@SearchProfilesResponse' {} Maybe [ProfileData]
a -> SearchProfilesResponse
s {$sel:profiles:SearchProfilesResponse' :: Maybe [ProfileData]
profiles = Maybe [ProfileData]
a} :: SearchProfilesResponse) 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 total number of room profiles returned.
searchProfilesResponse_totalCount :: Lens.Lens' SearchProfilesResponse (Prelude.Maybe Prelude.Int)
searchProfilesResponse_totalCount :: Lens' SearchProfilesResponse (Maybe Int)
searchProfilesResponse_totalCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchProfilesResponse' {Maybe Int
totalCount :: Maybe Int
$sel:totalCount:SearchProfilesResponse' :: SearchProfilesResponse -> Maybe Int
totalCount} -> Maybe Int
totalCount) (\s :: SearchProfilesResponse
s@SearchProfilesResponse' {} Maybe Int
a -> SearchProfilesResponse
s {$sel:totalCount:SearchProfilesResponse' :: Maybe Int
totalCount = Maybe Int
a} :: SearchProfilesResponse)

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

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