{-# 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.SearchNetworkProfiles
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Searches network profiles and lists the ones that meet a set of filter
-- and sort criteria.
module Amazonka.AlexaBusiness.SearchNetworkProfiles
  ( -- * Creating a Request
    SearchNetworkProfiles (..),
    newSearchNetworkProfiles,

    -- * Request Lenses
    searchNetworkProfiles_filters,
    searchNetworkProfiles_sortCriteria,
    searchNetworkProfiles_nextToken,
    searchNetworkProfiles_maxResults,

    -- * Destructuring the Response
    SearchNetworkProfilesResponse (..),
    newSearchNetworkProfilesResponse,

    -- * Response Lenses
    searchNetworkProfilesResponse_networkProfiles,
    searchNetworkProfilesResponse_nextToken,
    searchNetworkProfilesResponse_totalCount,
    searchNetworkProfilesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newSearchNetworkProfiles' smart constructor.
data SearchNetworkProfiles = SearchNetworkProfiles'
  { -- | The filters to use to list a specified set of network profiles. Valid
    -- filters are NetworkProfileName, Ssid, and SecurityType.
    SearchNetworkProfiles -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The sort order to use to list the specified set of network profiles.
    -- Valid sort criteria includes NetworkProfileName, Ssid, and SecurityType.
    SearchNetworkProfiles -> Maybe [Sort]
sortCriteria :: Prelude.Maybe [Sort],
    -- | 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.
    SearchNetworkProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | 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.
    SearchNetworkProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (SearchNetworkProfiles -> SearchNetworkProfiles -> Bool
(SearchNetworkProfiles -> SearchNetworkProfiles -> Bool)
-> (SearchNetworkProfiles -> SearchNetworkProfiles -> Bool)
-> Eq SearchNetworkProfiles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchNetworkProfiles -> SearchNetworkProfiles -> Bool
$c/= :: SearchNetworkProfiles -> SearchNetworkProfiles -> Bool
== :: SearchNetworkProfiles -> SearchNetworkProfiles -> Bool
$c== :: SearchNetworkProfiles -> SearchNetworkProfiles -> Bool
Prelude.Eq, ReadPrec [SearchNetworkProfiles]
ReadPrec SearchNetworkProfiles
Int -> ReadS SearchNetworkProfiles
ReadS [SearchNetworkProfiles]
(Int -> ReadS SearchNetworkProfiles)
-> ReadS [SearchNetworkProfiles]
-> ReadPrec SearchNetworkProfiles
-> ReadPrec [SearchNetworkProfiles]
-> Read SearchNetworkProfiles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchNetworkProfiles]
$creadListPrec :: ReadPrec [SearchNetworkProfiles]
readPrec :: ReadPrec SearchNetworkProfiles
$creadPrec :: ReadPrec SearchNetworkProfiles
readList :: ReadS [SearchNetworkProfiles]
$creadList :: ReadS [SearchNetworkProfiles]
readsPrec :: Int -> ReadS SearchNetworkProfiles
$creadsPrec :: Int -> ReadS SearchNetworkProfiles
Prelude.Read, Int -> SearchNetworkProfiles -> ShowS
[SearchNetworkProfiles] -> ShowS
SearchNetworkProfiles -> String
(Int -> SearchNetworkProfiles -> ShowS)
-> (SearchNetworkProfiles -> String)
-> ([SearchNetworkProfiles] -> ShowS)
-> Show SearchNetworkProfiles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchNetworkProfiles] -> ShowS
$cshowList :: [SearchNetworkProfiles] -> ShowS
show :: SearchNetworkProfiles -> String
$cshow :: SearchNetworkProfiles -> String
showsPrec :: Int -> SearchNetworkProfiles -> ShowS
$cshowsPrec :: Int -> SearchNetworkProfiles -> ShowS
Prelude.Show, (forall x. SearchNetworkProfiles -> Rep SearchNetworkProfiles x)
-> (forall x. Rep SearchNetworkProfiles x -> SearchNetworkProfiles)
-> Generic SearchNetworkProfiles
forall x. Rep SearchNetworkProfiles x -> SearchNetworkProfiles
forall x. SearchNetworkProfiles -> Rep SearchNetworkProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchNetworkProfiles x -> SearchNetworkProfiles
$cfrom :: forall x. SearchNetworkProfiles -> Rep SearchNetworkProfiles x
Prelude.Generic)

-- |
-- Create a value of 'SearchNetworkProfiles' 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', 'searchNetworkProfiles_filters' - The filters to use to list a specified set of network profiles. Valid
-- filters are NetworkProfileName, Ssid, and SecurityType.
--
-- 'sortCriteria', 'searchNetworkProfiles_sortCriteria' - The sort order to use to list the specified set of network profiles.
-- Valid sort criteria includes NetworkProfileName, Ssid, and SecurityType.
--
-- 'nextToken', 'searchNetworkProfiles_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.
--
-- 'maxResults', 'searchNetworkProfiles_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.
newSearchNetworkProfiles ::
  SearchNetworkProfiles
newSearchNetworkProfiles :: SearchNetworkProfiles
newSearchNetworkProfiles =
  SearchNetworkProfiles' :: Maybe [Filter]
-> Maybe [Sort]
-> Maybe Text
-> Maybe Natural
-> SearchNetworkProfiles
SearchNetworkProfiles'
    { $sel:filters:SearchNetworkProfiles' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:sortCriteria:SearchNetworkProfiles' :: Maybe [Sort]
sortCriteria = Maybe [Sort]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SearchNetworkProfiles' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:SearchNetworkProfiles' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The filters to use to list a specified set of network profiles. Valid
-- filters are NetworkProfileName, Ssid, and SecurityType.
searchNetworkProfiles_filters :: Lens.Lens' SearchNetworkProfiles (Prelude.Maybe [Filter])
searchNetworkProfiles_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> SearchNetworkProfiles -> f SearchNetworkProfiles
searchNetworkProfiles_filters = (SearchNetworkProfiles -> Maybe [Filter])
-> (SearchNetworkProfiles
    -> Maybe [Filter] -> SearchNetworkProfiles)
-> Lens
     SearchNetworkProfiles
     SearchNetworkProfiles
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfiles' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: SearchNetworkProfiles
s@SearchNetworkProfiles' {} Maybe [Filter]
a -> SearchNetworkProfiles
s {$sel:filters:SearchNetworkProfiles' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: SearchNetworkProfiles) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> SearchNetworkProfiles -> f SearchNetworkProfiles)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> SearchNetworkProfiles
-> f SearchNetworkProfiles
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The sort order to use to list the specified set of network profiles.
-- Valid sort criteria includes NetworkProfileName, Ssid, and SecurityType.
searchNetworkProfiles_sortCriteria :: Lens.Lens' SearchNetworkProfiles (Prelude.Maybe [Sort])
searchNetworkProfiles_sortCriteria :: (Maybe [Sort] -> f (Maybe [Sort]))
-> SearchNetworkProfiles -> f SearchNetworkProfiles
searchNetworkProfiles_sortCriteria = (SearchNetworkProfiles -> Maybe [Sort])
-> (SearchNetworkProfiles -> Maybe [Sort] -> SearchNetworkProfiles)
-> Lens
     SearchNetworkProfiles
     SearchNetworkProfiles
     (Maybe [Sort])
     (Maybe [Sort])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfiles' {Maybe [Sort]
sortCriteria :: Maybe [Sort]
$sel:sortCriteria:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe [Sort]
sortCriteria} -> Maybe [Sort]
sortCriteria) (\s :: SearchNetworkProfiles
s@SearchNetworkProfiles' {} Maybe [Sort]
a -> SearchNetworkProfiles
s {$sel:sortCriteria:SearchNetworkProfiles' :: Maybe [Sort]
sortCriteria = Maybe [Sort]
a} :: SearchNetworkProfiles) ((Maybe [Sort] -> f (Maybe [Sort]))
 -> SearchNetworkProfiles -> f SearchNetworkProfiles)
-> ((Maybe [Sort] -> f (Maybe [Sort]))
    -> Maybe [Sort] -> f (Maybe [Sort]))
-> (Maybe [Sort] -> f (Maybe [Sort]))
-> SearchNetworkProfiles
-> f SearchNetworkProfiles
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Sort] [Sort] [Sort] [Sort]
-> Iso (Maybe [Sort]) (Maybe [Sort]) (Maybe [Sort]) (Maybe [Sort])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Sort] [Sort] [Sort] [Sort]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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.
searchNetworkProfiles_nextToken :: Lens.Lens' SearchNetworkProfiles (Prelude.Maybe Prelude.Text)
searchNetworkProfiles_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchNetworkProfiles -> f SearchNetworkProfiles
searchNetworkProfiles_nextToken = (SearchNetworkProfiles -> Maybe Text)
-> (SearchNetworkProfiles -> Maybe Text -> SearchNetworkProfiles)
-> Lens
     SearchNetworkProfiles
     SearchNetworkProfiles
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchNetworkProfiles
s@SearchNetworkProfiles' {} Maybe Text
a -> SearchNetworkProfiles
s {$sel:nextToken:SearchNetworkProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: SearchNetworkProfiles)

-- | 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.
searchNetworkProfiles_maxResults :: Lens.Lens' SearchNetworkProfiles (Prelude.Maybe Prelude.Natural)
searchNetworkProfiles_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> SearchNetworkProfiles -> f SearchNetworkProfiles
searchNetworkProfiles_maxResults = (SearchNetworkProfiles -> Maybe Natural)
-> (SearchNetworkProfiles
    -> Maybe Natural -> SearchNetworkProfiles)
-> Lens
     SearchNetworkProfiles
     SearchNetworkProfiles
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfiles' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: SearchNetworkProfiles
s@SearchNetworkProfiles' {} Maybe Natural
a -> SearchNetworkProfiles
s {$sel:maxResults:SearchNetworkProfiles' :: Maybe Natural
maxResults = Maybe Natural
a} :: SearchNetworkProfiles)

instance Core.AWSRequest SearchNetworkProfiles where
  type
    AWSResponse SearchNetworkProfiles =
      SearchNetworkProfilesResponse
  request :: SearchNetworkProfiles -> Request SearchNetworkProfiles
request = Service -> SearchNetworkProfiles -> Request SearchNetworkProfiles
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy SearchNetworkProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SearchNetworkProfiles)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse SearchNetworkProfiles))
-> Logger
-> Service
-> Proxy SearchNetworkProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SearchNetworkProfiles)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [NetworkProfileData]
-> Maybe Text -> Maybe Int -> Int -> SearchNetworkProfilesResponse
SearchNetworkProfilesResponse'
            (Maybe [NetworkProfileData]
 -> Maybe Text -> Maybe Int -> Int -> SearchNetworkProfilesResponse)
-> Either String (Maybe [NetworkProfileData])
-> Either
     String
     (Maybe Text -> Maybe Int -> Int -> SearchNetworkProfilesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [NetworkProfileData]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NetworkProfiles"
                            Either String (Maybe (Maybe [NetworkProfileData]))
-> Maybe [NetworkProfileData]
-> Either String (Maybe [NetworkProfileData])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [NetworkProfileData]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text -> Maybe Int -> Int -> SearchNetworkProfilesResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Int -> Int -> SearchNetworkProfilesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Maybe Int -> Int -> SearchNetworkProfilesResponse)
-> Either String (Maybe Int)
-> Either String (Int -> SearchNetworkProfilesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TotalCount")
            Either String (Int -> SearchNetworkProfilesResponse)
-> Either String Int -> Either String SearchNetworkProfilesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable SearchNetworkProfiles

instance Prelude.NFData SearchNetworkProfiles

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

instance Core.ToJSON SearchNetworkProfiles where
  toJSON :: SearchNetworkProfiles -> Value
toJSON SearchNetworkProfiles' {Maybe Natural
Maybe [Filter]
Maybe [Sort]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
sortCriteria :: Maybe [Sort]
filters :: Maybe [Filter]
$sel:maxResults:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe Natural
$sel:nextToken:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe Text
$sel:sortCriteria:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe [Sort]
$sel:filters:SearchNetworkProfiles' :: SearchNetworkProfiles -> Maybe [Filter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"SortCriteria" Text -> [Sort] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Sort] -> Pair) -> Maybe [Sort] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Sort]
sortCriteria,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newSearchNetworkProfilesResponse' smart constructor.
data SearchNetworkProfilesResponse = SearchNetworkProfilesResponse'
  { -- | The network profiles that meet the specified set of filter criteria, in
    -- sort order. It is a list of NetworkProfileData objects.
    SearchNetworkProfilesResponse -> Maybe [NetworkProfileData]
networkProfiles :: Prelude.Maybe [NetworkProfileData],
    -- | 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.
    SearchNetworkProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The total number of network profiles returned.
    SearchNetworkProfilesResponse -> Maybe Int
totalCount :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    SearchNetworkProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SearchNetworkProfilesResponse
-> SearchNetworkProfilesResponse -> Bool
(SearchNetworkProfilesResponse
 -> SearchNetworkProfilesResponse -> Bool)
-> (SearchNetworkProfilesResponse
    -> SearchNetworkProfilesResponse -> Bool)
-> Eq SearchNetworkProfilesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchNetworkProfilesResponse
-> SearchNetworkProfilesResponse -> Bool
$c/= :: SearchNetworkProfilesResponse
-> SearchNetworkProfilesResponse -> Bool
== :: SearchNetworkProfilesResponse
-> SearchNetworkProfilesResponse -> Bool
$c== :: SearchNetworkProfilesResponse
-> SearchNetworkProfilesResponse -> Bool
Prelude.Eq, ReadPrec [SearchNetworkProfilesResponse]
ReadPrec SearchNetworkProfilesResponse
Int -> ReadS SearchNetworkProfilesResponse
ReadS [SearchNetworkProfilesResponse]
(Int -> ReadS SearchNetworkProfilesResponse)
-> ReadS [SearchNetworkProfilesResponse]
-> ReadPrec SearchNetworkProfilesResponse
-> ReadPrec [SearchNetworkProfilesResponse]
-> Read SearchNetworkProfilesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SearchNetworkProfilesResponse]
$creadListPrec :: ReadPrec [SearchNetworkProfilesResponse]
readPrec :: ReadPrec SearchNetworkProfilesResponse
$creadPrec :: ReadPrec SearchNetworkProfilesResponse
readList :: ReadS [SearchNetworkProfilesResponse]
$creadList :: ReadS [SearchNetworkProfilesResponse]
readsPrec :: Int -> ReadS SearchNetworkProfilesResponse
$creadsPrec :: Int -> ReadS SearchNetworkProfilesResponse
Prelude.Read, Int -> SearchNetworkProfilesResponse -> ShowS
[SearchNetworkProfilesResponse] -> ShowS
SearchNetworkProfilesResponse -> String
(Int -> SearchNetworkProfilesResponse -> ShowS)
-> (SearchNetworkProfilesResponse -> String)
-> ([SearchNetworkProfilesResponse] -> ShowS)
-> Show SearchNetworkProfilesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchNetworkProfilesResponse] -> ShowS
$cshowList :: [SearchNetworkProfilesResponse] -> ShowS
show :: SearchNetworkProfilesResponse -> String
$cshow :: SearchNetworkProfilesResponse -> String
showsPrec :: Int -> SearchNetworkProfilesResponse -> ShowS
$cshowsPrec :: Int -> SearchNetworkProfilesResponse -> ShowS
Prelude.Show, (forall x.
 SearchNetworkProfilesResponse
 -> Rep SearchNetworkProfilesResponse x)
-> (forall x.
    Rep SearchNetworkProfilesResponse x
    -> SearchNetworkProfilesResponse)
-> Generic SearchNetworkProfilesResponse
forall x.
Rep SearchNetworkProfilesResponse x
-> SearchNetworkProfilesResponse
forall x.
SearchNetworkProfilesResponse
-> Rep SearchNetworkProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SearchNetworkProfilesResponse x
-> SearchNetworkProfilesResponse
$cfrom :: forall x.
SearchNetworkProfilesResponse
-> Rep SearchNetworkProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'SearchNetworkProfilesResponse' 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:
--
-- 'networkProfiles', 'searchNetworkProfilesResponse_networkProfiles' - The network profiles that meet the specified set of filter criteria, in
-- sort order. It is a list of NetworkProfileData objects.
--
-- 'nextToken', 'searchNetworkProfilesResponse_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.
--
-- 'totalCount', 'searchNetworkProfilesResponse_totalCount' - The total number of network profiles returned.
--
-- 'httpStatus', 'searchNetworkProfilesResponse_httpStatus' - The response's http status code.
newSearchNetworkProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SearchNetworkProfilesResponse
newSearchNetworkProfilesResponse :: Int -> SearchNetworkProfilesResponse
newSearchNetworkProfilesResponse Int
pHttpStatus_ =
  SearchNetworkProfilesResponse' :: Maybe [NetworkProfileData]
-> Maybe Text -> Maybe Int -> Int -> SearchNetworkProfilesResponse
SearchNetworkProfilesResponse'
    { $sel:networkProfiles:SearchNetworkProfilesResponse' :: Maybe [NetworkProfileData]
networkProfiles =
        Maybe [NetworkProfileData]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:SearchNetworkProfilesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:totalCount:SearchNetworkProfilesResponse' :: Maybe Int
totalCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SearchNetworkProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The network profiles that meet the specified set of filter criteria, in
-- sort order. It is a list of NetworkProfileData objects.
searchNetworkProfilesResponse_networkProfiles :: Lens.Lens' SearchNetworkProfilesResponse (Prelude.Maybe [NetworkProfileData])
searchNetworkProfilesResponse_networkProfiles :: (Maybe [NetworkProfileData] -> f (Maybe [NetworkProfileData]))
-> SearchNetworkProfilesResponse -> f SearchNetworkProfilesResponse
searchNetworkProfilesResponse_networkProfiles = (SearchNetworkProfilesResponse -> Maybe [NetworkProfileData])
-> (SearchNetworkProfilesResponse
    -> Maybe [NetworkProfileData] -> SearchNetworkProfilesResponse)
-> Lens
     SearchNetworkProfilesResponse
     SearchNetworkProfilesResponse
     (Maybe [NetworkProfileData])
     (Maybe [NetworkProfileData])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfilesResponse' {Maybe [NetworkProfileData]
networkProfiles :: Maybe [NetworkProfileData]
$sel:networkProfiles:SearchNetworkProfilesResponse' :: SearchNetworkProfilesResponse -> Maybe [NetworkProfileData]
networkProfiles} -> Maybe [NetworkProfileData]
networkProfiles) (\s :: SearchNetworkProfilesResponse
s@SearchNetworkProfilesResponse' {} Maybe [NetworkProfileData]
a -> SearchNetworkProfilesResponse
s {$sel:networkProfiles:SearchNetworkProfilesResponse' :: Maybe [NetworkProfileData]
networkProfiles = Maybe [NetworkProfileData]
a} :: SearchNetworkProfilesResponse) ((Maybe [NetworkProfileData] -> f (Maybe [NetworkProfileData]))
 -> SearchNetworkProfilesResponse
 -> f SearchNetworkProfilesResponse)
-> ((Maybe [NetworkProfileData] -> f (Maybe [NetworkProfileData]))
    -> Maybe [NetworkProfileData] -> f (Maybe [NetworkProfileData]))
-> (Maybe [NetworkProfileData] -> f (Maybe [NetworkProfileData]))
-> SearchNetworkProfilesResponse
-> f SearchNetworkProfilesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [NetworkProfileData]
  [NetworkProfileData]
  [NetworkProfileData]
  [NetworkProfileData]
-> Iso
     (Maybe [NetworkProfileData])
     (Maybe [NetworkProfileData])
     (Maybe [NetworkProfileData])
     (Maybe [NetworkProfileData])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [NetworkProfileData]
  [NetworkProfileData]
  [NetworkProfileData]
  [NetworkProfileData]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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.
searchNetworkProfilesResponse_nextToken :: Lens.Lens' SearchNetworkProfilesResponse (Prelude.Maybe Prelude.Text)
searchNetworkProfilesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> SearchNetworkProfilesResponse -> f SearchNetworkProfilesResponse
searchNetworkProfilesResponse_nextToken = (SearchNetworkProfilesResponse -> Maybe Text)
-> (SearchNetworkProfilesResponse
    -> Maybe Text -> SearchNetworkProfilesResponse)
-> Lens
     SearchNetworkProfilesResponse
     SearchNetworkProfilesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:SearchNetworkProfilesResponse' :: SearchNetworkProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: SearchNetworkProfilesResponse
s@SearchNetworkProfilesResponse' {} Maybe Text
a -> SearchNetworkProfilesResponse
s {$sel:nextToken:SearchNetworkProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: SearchNetworkProfilesResponse)

-- | The total number of network profiles returned.
searchNetworkProfilesResponse_totalCount :: Lens.Lens' SearchNetworkProfilesResponse (Prelude.Maybe Prelude.Int)
searchNetworkProfilesResponse_totalCount :: (Maybe Int -> f (Maybe Int))
-> SearchNetworkProfilesResponse -> f SearchNetworkProfilesResponse
searchNetworkProfilesResponse_totalCount = (SearchNetworkProfilesResponse -> Maybe Int)
-> (SearchNetworkProfilesResponse
    -> Maybe Int -> SearchNetworkProfilesResponse)
-> Lens
     SearchNetworkProfilesResponse
     SearchNetworkProfilesResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SearchNetworkProfilesResponse' {Maybe Int
totalCount :: Maybe Int
$sel:totalCount:SearchNetworkProfilesResponse' :: SearchNetworkProfilesResponse -> Maybe Int
totalCount} -> Maybe Int
totalCount) (\s :: SearchNetworkProfilesResponse
s@SearchNetworkProfilesResponse' {} Maybe Int
a -> SearchNetworkProfilesResponse
s {$sel:totalCount:SearchNetworkProfilesResponse' :: Maybe Int
totalCount = Maybe Int
a} :: SearchNetworkProfilesResponse)

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

instance Prelude.NFData SearchNetworkProfilesResponse