{-# 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.DeviceFarm.ListNetworkProfiles
-- 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)
--
-- Returns the list of available network profiles.
--
-- This operation returns paginated results.
module Amazonka.DeviceFarm.ListNetworkProfiles
  ( -- * Creating a Request
    ListNetworkProfiles (..),
    newListNetworkProfiles,

    -- * Request Lenses
    listNetworkProfiles_nextToken,
    listNetworkProfiles_type,
    listNetworkProfiles_arn,

    -- * Destructuring the Response
    ListNetworkProfilesResponse (..),
    newListNetworkProfilesResponse,

    -- * Response Lenses
    listNetworkProfilesResponse_networkProfiles,
    listNetworkProfilesResponse_nextToken,
    listNetworkProfilesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types
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:/ 'newListNetworkProfiles' smart constructor.
data ListNetworkProfiles = ListNetworkProfiles'
  { -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListNetworkProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The type of network profile to return information about. Valid values
    -- are listed here.
    ListNetworkProfiles -> Maybe NetworkProfileType
type' :: Prelude.Maybe NetworkProfileType,
    -- | The Amazon Resource Name (ARN) of the project for which you want to list
    -- network profiles.
    ListNetworkProfiles -> Text
arn :: Prelude.Text
  }
  deriving (ListNetworkProfiles -> ListNetworkProfiles -> Bool
(ListNetworkProfiles -> ListNetworkProfiles -> Bool)
-> (ListNetworkProfiles -> ListNetworkProfiles -> Bool)
-> Eq ListNetworkProfiles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNetworkProfiles -> ListNetworkProfiles -> Bool
$c/= :: ListNetworkProfiles -> ListNetworkProfiles -> Bool
== :: ListNetworkProfiles -> ListNetworkProfiles -> Bool
$c== :: ListNetworkProfiles -> ListNetworkProfiles -> Bool
Prelude.Eq, ReadPrec [ListNetworkProfiles]
ReadPrec ListNetworkProfiles
Int -> ReadS ListNetworkProfiles
ReadS [ListNetworkProfiles]
(Int -> ReadS ListNetworkProfiles)
-> ReadS [ListNetworkProfiles]
-> ReadPrec ListNetworkProfiles
-> ReadPrec [ListNetworkProfiles]
-> Read ListNetworkProfiles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNetworkProfiles]
$creadListPrec :: ReadPrec [ListNetworkProfiles]
readPrec :: ReadPrec ListNetworkProfiles
$creadPrec :: ReadPrec ListNetworkProfiles
readList :: ReadS [ListNetworkProfiles]
$creadList :: ReadS [ListNetworkProfiles]
readsPrec :: Int -> ReadS ListNetworkProfiles
$creadsPrec :: Int -> ReadS ListNetworkProfiles
Prelude.Read, Int -> ListNetworkProfiles -> ShowS
[ListNetworkProfiles] -> ShowS
ListNetworkProfiles -> String
(Int -> ListNetworkProfiles -> ShowS)
-> (ListNetworkProfiles -> String)
-> ([ListNetworkProfiles] -> ShowS)
-> Show ListNetworkProfiles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNetworkProfiles] -> ShowS
$cshowList :: [ListNetworkProfiles] -> ShowS
show :: ListNetworkProfiles -> String
$cshow :: ListNetworkProfiles -> String
showsPrec :: Int -> ListNetworkProfiles -> ShowS
$cshowsPrec :: Int -> ListNetworkProfiles -> ShowS
Prelude.Show, (forall x. ListNetworkProfiles -> Rep ListNetworkProfiles x)
-> (forall x. Rep ListNetworkProfiles x -> ListNetworkProfiles)
-> Generic ListNetworkProfiles
forall x. Rep ListNetworkProfiles x -> ListNetworkProfiles
forall x. ListNetworkProfiles -> Rep ListNetworkProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNetworkProfiles x -> ListNetworkProfiles
$cfrom :: forall x. ListNetworkProfiles -> Rep ListNetworkProfiles x
Prelude.Generic)

-- |
-- Create a value of 'ListNetworkProfiles' 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', 'listNetworkProfiles_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'type'', 'listNetworkProfiles_type' - The type of network profile to return information about. Valid values
-- are listed here.
--
-- 'arn', 'listNetworkProfiles_arn' - The Amazon Resource Name (ARN) of the project for which you want to list
-- network profiles.
newListNetworkProfiles ::
  -- | 'arn'
  Prelude.Text ->
  ListNetworkProfiles
newListNetworkProfiles :: Text -> ListNetworkProfiles
newListNetworkProfiles Text
pArn_ =
  ListNetworkProfiles' :: Maybe Text
-> Maybe NetworkProfileType -> Text -> ListNetworkProfiles
ListNetworkProfiles'
    { $sel:nextToken:ListNetworkProfiles' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ListNetworkProfiles' :: Maybe NetworkProfileType
type' = Maybe NetworkProfileType
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ListNetworkProfiles' :: Text
arn = Text
pArn_
    }

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listNetworkProfiles_nextToken :: Lens.Lens' ListNetworkProfiles (Prelude.Maybe Prelude.Text)
listNetworkProfiles_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListNetworkProfiles -> f ListNetworkProfiles
listNetworkProfiles_nextToken = (ListNetworkProfiles -> Maybe Text)
-> (ListNetworkProfiles -> Maybe Text -> ListNetworkProfiles)
-> Lens
     ListNetworkProfiles ListNetworkProfiles (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworkProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNetworkProfiles' :: ListNetworkProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNetworkProfiles
s@ListNetworkProfiles' {} Maybe Text
a -> ListNetworkProfiles
s {$sel:nextToken:ListNetworkProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: ListNetworkProfiles)

-- | The type of network profile to return information about. Valid values
-- are listed here.
listNetworkProfiles_type :: Lens.Lens' ListNetworkProfiles (Prelude.Maybe NetworkProfileType)
listNetworkProfiles_type :: (Maybe NetworkProfileType -> f (Maybe NetworkProfileType))
-> ListNetworkProfiles -> f ListNetworkProfiles
listNetworkProfiles_type = (ListNetworkProfiles -> Maybe NetworkProfileType)
-> (ListNetworkProfiles
    -> Maybe NetworkProfileType -> ListNetworkProfiles)
-> Lens
     ListNetworkProfiles
     ListNetworkProfiles
     (Maybe NetworkProfileType)
     (Maybe NetworkProfileType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworkProfiles' {Maybe NetworkProfileType
type' :: Maybe NetworkProfileType
$sel:type':ListNetworkProfiles' :: ListNetworkProfiles -> Maybe NetworkProfileType
type'} -> Maybe NetworkProfileType
type') (\s :: ListNetworkProfiles
s@ListNetworkProfiles' {} Maybe NetworkProfileType
a -> ListNetworkProfiles
s {$sel:type':ListNetworkProfiles' :: Maybe NetworkProfileType
type' = Maybe NetworkProfileType
a} :: ListNetworkProfiles)

-- | The Amazon Resource Name (ARN) of the project for which you want to list
-- network profiles.
listNetworkProfiles_arn :: Lens.Lens' ListNetworkProfiles Prelude.Text
listNetworkProfiles_arn :: (Text -> f Text) -> ListNetworkProfiles -> f ListNetworkProfiles
listNetworkProfiles_arn = (ListNetworkProfiles -> Text)
-> (ListNetworkProfiles -> Text -> ListNetworkProfiles)
-> Lens ListNetworkProfiles ListNetworkProfiles Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworkProfiles' {Text
arn :: Text
$sel:arn:ListNetworkProfiles' :: ListNetworkProfiles -> Text
arn} -> Text
arn) (\s :: ListNetworkProfiles
s@ListNetworkProfiles' {} Text
a -> ListNetworkProfiles
s {$sel:arn:ListNetworkProfiles' :: Text
arn = Text
a} :: ListNetworkProfiles)

instance Core.AWSPager ListNetworkProfiles where
  page :: ListNetworkProfiles
-> AWSResponse ListNetworkProfiles -> Maybe ListNetworkProfiles
page ListNetworkProfiles
rq AWSResponse ListNetworkProfiles
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListNetworkProfiles
ListNetworkProfilesResponse
rs
            ListNetworkProfilesResponse
-> Getting (First Text) ListNetworkProfilesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListNetworkProfilesResponse
-> Const (First Text) ListNetworkProfilesResponse
Lens' ListNetworkProfilesResponse (Maybe Text)
listNetworkProfilesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListNetworkProfilesResponse
 -> Const (First Text) ListNetworkProfilesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListNetworkProfilesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListNetworkProfiles
forall a. Maybe a
Prelude.Nothing
    | Maybe [NetworkProfile] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListNetworkProfiles
ListNetworkProfilesResponse
rs
            ListNetworkProfilesResponse
-> Getting
     (First [NetworkProfile])
     ListNetworkProfilesResponse
     [NetworkProfile]
-> Maybe [NetworkProfile]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [NetworkProfile]
 -> Const (First [NetworkProfile]) (Maybe [NetworkProfile]))
-> ListNetworkProfilesResponse
-> Const (First [NetworkProfile]) ListNetworkProfilesResponse
Lens' ListNetworkProfilesResponse (Maybe [NetworkProfile])
listNetworkProfilesResponse_networkProfiles
              ((Maybe [NetworkProfile]
  -> Const (First [NetworkProfile]) (Maybe [NetworkProfile]))
 -> ListNetworkProfilesResponse
 -> Const (First [NetworkProfile]) ListNetworkProfilesResponse)
-> (([NetworkProfile]
     -> Const (First [NetworkProfile]) [NetworkProfile])
    -> Maybe [NetworkProfile]
    -> Const (First [NetworkProfile]) (Maybe [NetworkProfile]))
-> Getting
     (First [NetworkProfile])
     ListNetworkProfilesResponse
     [NetworkProfile]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([NetworkProfile]
 -> Const (First [NetworkProfile]) [NetworkProfile])
-> Maybe [NetworkProfile]
-> Const (First [NetworkProfile]) (Maybe [NetworkProfile])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListNetworkProfiles
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListNetworkProfiles -> Maybe ListNetworkProfiles
forall a. a -> Maybe a
Prelude.Just (ListNetworkProfiles -> Maybe ListNetworkProfiles)
-> ListNetworkProfiles -> Maybe ListNetworkProfiles
forall a b. (a -> b) -> a -> b
Prelude.$
        ListNetworkProfiles
rq
          ListNetworkProfiles
-> (ListNetworkProfiles -> ListNetworkProfiles)
-> ListNetworkProfiles
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListNetworkProfiles -> Identity ListNetworkProfiles
Lens
  ListNetworkProfiles ListNetworkProfiles (Maybe Text) (Maybe Text)
listNetworkProfiles_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListNetworkProfiles -> Identity ListNetworkProfiles)
-> Maybe Text -> ListNetworkProfiles -> ListNetworkProfiles
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListNetworkProfiles
ListNetworkProfilesResponse
rs
          ListNetworkProfilesResponse
-> Getting (First Text) ListNetworkProfilesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListNetworkProfilesResponse
-> Const (First Text) ListNetworkProfilesResponse
Lens' ListNetworkProfilesResponse (Maybe Text)
listNetworkProfilesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListNetworkProfilesResponse
 -> Const (First Text) ListNetworkProfilesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListNetworkProfilesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListNetworkProfiles where
  type
    AWSResponse ListNetworkProfiles =
      ListNetworkProfilesResponse
  request :: ListNetworkProfiles -> Request ListNetworkProfiles
request = Service -> ListNetworkProfiles -> Request ListNetworkProfiles
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListNetworkProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListNetworkProfiles)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListNetworkProfiles))
-> Logger
-> Service
-> Proxy ListNetworkProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListNetworkProfiles)))
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 [NetworkProfile]
-> Maybe Text -> Int -> ListNetworkProfilesResponse
ListNetworkProfilesResponse'
            (Maybe [NetworkProfile]
 -> Maybe Text -> Int -> ListNetworkProfilesResponse)
-> Either String (Maybe [NetworkProfile])
-> Either String (Maybe Text -> Int -> ListNetworkProfilesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [NetworkProfile]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"networkProfiles"
                            Either String (Maybe (Maybe [NetworkProfile]))
-> Maybe [NetworkProfile] -> Either String (Maybe [NetworkProfile])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [NetworkProfile]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListNetworkProfilesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListNetworkProfilesResponse)
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 (Int -> ListNetworkProfilesResponse)
-> Either String Int -> Either String ListNetworkProfilesResponse
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 ListNetworkProfiles

instance Prelude.NFData ListNetworkProfiles

instance Core.ToHeaders ListNetworkProfiles where
  toHeaders :: ListNetworkProfiles -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListNetworkProfiles -> 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
"DeviceFarm_20150623.ListNetworkProfiles" ::
                          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 ListNetworkProfiles where
  toJSON :: ListNetworkProfiles -> Value
toJSON ListNetworkProfiles' {Maybe Text
Maybe NetworkProfileType
Text
arn :: Text
type' :: Maybe NetworkProfileType
nextToken :: Maybe Text
$sel:arn:ListNetworkProfiles' :: ListNetworkProfiles -> Text
$sel:type':ListNetworkProfiles' :: ListNetworkProfiles -> Maybe NetworkProfileType
$sel:nextToken:ListNetworkProfiles' :: ListNetworkProfiles -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"type" Text -> NetworkProfileType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NetworkProfileType -> Pair)
-> Maybe NetworkProfileType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkProfileType
type',
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
arn)
          ]
      )

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

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

-- | /See:/ 'newListNetworkProfilesResponse' smart constructor.
data ListNetworkProfilesResponse = ListNetworkProfilesResponse'
  { -- | A list of the available network profiles.
    ListNetworkProfilesResponse -> Maybe [NetworkProfile]
networkProfiles :: Prelude.Maybe [NetworkProfile],
    -- | An identifier that was returned from the previous call to this
    -- operation, which can be used to return the next set of items in the
    -- list.
    ListNetworkProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListNetworkProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListNetworkProfilesResponse -> ListNetworkProfilesResponse -> Bool
(ListNetworkProfilesResponse
 -> ListNetworkProfilesResponse -> Bool)
-> (ListNetworkProfilesResponse
    -> ListNetworkProfilesResponse -> Bool)
-> Eq ListNetworkProfilesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNetworkProfilesResponse -> ListNetworkProfilesResponse -> Bool
$c/= :: ListNetworkProfilesResponse -> ListNetworkProfilesResponse -> Bool
== :: ListNetworkProfilesResponse -> ListNetworkProfilesResponse -> Bool
$c== :: ListNetworkProfilesResponse -> ListNetworkProfilesResponse -> Bool
Prelude.Eq, ReadPrec [ListNetworkProfilesResponse]
ReadPrec ListNetworkProfilesResponse
Int -> ReadS ListNetworkProfilesResponse
ReadS [ListNetworkProfilesResponse]
(Int -> ReadS ListNetworkProfilesResponse)
-> ReadS [ListNetworkProfilesResponse]
-> ReadPrec ListNetworkProfilesResponse
-> ReadPrec [ListNetworkProfilesResponse]
-> Read ListNetworkProfilesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNetworkProfilesResponse]
$creadListPrec :: ReadPrec [ListNetworkProfilesResponse]
readPrec :: ReadPrec ListNetworkProfilesResponse
$creadPrec :: ReadPrec ListNetworkProfilesResponse
readList :: ReadS [ListNetworkProfilesResponse]
$creadList :: ReadS [ListNetworkProfilesResponse]
readsPrec :: Int -> ReadS ListNetworkProfilesResponse
$creadsPrec :: Int -> ReadS ListNetworkProfilesResponse
Prelude.Read, Int -> ListNetworkProfilesResponse -> ShowS
[ListNetworkProfilesResponse] -> ShowS
ListNetworkProfilesResponse -> String
(Int -> ListNetworkProfilesResponse -> ShowS)
-> (ListNetworkProfilesResponse -> String)
-> ([ListNetworkProfilesResponse] -> ShowS)
-> Show ListNetworkProfilesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNetworkProfilesResponse] -> ShowS
$cshowList :: [ListNetworkProfilesResponse] -> ShowS
show :: ListNetworkProfilesResponse -> String
$cshow :: ListNetworkProfilesResponse -> String
showsPrec :: Int -> ListNetworkProfilesResponse -> ShowS
$cshowsPrec :: Int -> ListNetworkProfilesResponse -> ShowS
Prelude.Show, (forall x.
 ListNetworkProfilesResponse -> Rep ListNetworkProfilesResponse x)
-> (forall x.
    Rep ListNetworkProfilesResponse x -> ListNetworkProfilesResponse)
-> Generic ListNetworkProfilesResponse
forall x.
Rep ListNetworkProfilesResponse x -> ListNetworkProfilesResponse
forall x.
ListNetworkProfilesResponse -> Rep ListNetworkProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListNetworkProfilesResponse x -> ListNetworkProfilesResponse
$cfrom :: forall x.
ListNetworkProfilesResponse -> Rep ListNetworkProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListNetworkProfilesResponse' 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', 'listNetworkProfilesResponse_networkProfiles' - A list of the available network profiles.
--
-- 'nextToken', 'listNetworkProfilesResponse_nextToken' - An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
--
-- 'httpStatus', 'listNetworkProfilesResponse_httpStatus' - The response's http status code.
newListNetworkProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListNetworkProfilesResponse
newListNetworkProfilesResponse :: Int -> ListNetworkProfilesResponse
newListNetworkProfilesResponse Int
pHttpStatus_ =
  ListNetworkProfilesResponse' :: Maybe [NetworkProfile]
-> Maybe Text -> Int -> ListNetworkProfilesResponse
ListNetworkProfilesResponse'
    { $sel:networkProfiles:ListNetworkProfilesResponse' :: Maybe [NetworkProfile]
networkProfiles =
        Maybe [NetworkProfile]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNetworkProfilesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListNetworkProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of the available network profiles.
listNetworkProfilesResponse_networkProfiles :: Lens.Lens' ListNetworkProfilesResponse (Prelude.Maybe [NetworkProfile])
listNetworkProfilesResponse_networkProfiles :: (Maybe [NetworkProfile] -> f (Maybe [NetworkProfile]))
-> ListNetworkProfilesResponse -> f ListNetworkProfilesResponse
listNetworkProfilesResponse_networkProfiles = (ListNetworkProfilesResponse -> Maybe [NetworkProfile])
-> (ListNetworkProfilesResponse
    -> Maybe [NetworkProfile] -> ListNetworkProfilesResponse)
-> Lens' ListNetworkProfilesResponse (Maybe [NetworkProfile])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworkProfilesResponse' {Maybe [NetworkProfile]
networkProfiles :: Maybe [NetworkProfile]
$sel:networkProfiles:ListNetworkProfilesResponse' :: ListNetworkProfilesResponse -> Maybe [NetworkProfile]
networkProfiles} -> Maybe [NetworkProfile]
networkProfiles) (\s :: ListNetworkProfilesResponse
s@ListNetworkProfilesResponse' {} Maybe [NetworkProfile]
a -> ListNetworkProfilesResponse
s {$sel:networkProfiles:ListNetworkProfilesResponse' :: Maybe [NetworkProfile]
networkProfiles = Maybe [NetworkProfile]
a} :: ListNetworkProfilesResponse) ((Maybe [NetworkProfile] -> f (Maybe [NetworkProfile]))
 -> ListNetworkProfilesResponse -> f ListNetworkProfilesResponse)
-> ((Maybe [NetworkProfile] -> f (Maybe [NetworkProfile]))
    -> Maybe [NetworkProfile] -> f (Maybe [NetworkProfile]))
-> (Maybe [NetworkProfile] -> f (Maybe [NetworkProfile]))
-> ListNetworkProfilesResponse
-> f ListNetworkProfilesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [NetworkProfile] [NetworkProfile] [NetworkProfile] [NetworkProfile]
-> Iso
     (Maybe [NetworkProfile])
     (Maybe [NetworkProfile])
     (Maybe [NetworkProfile])
     (Maybe [NetworkProfile])
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
  [NetworkProfile] [NetworkProfile] [NetworkProfile] [NetworkProfile]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An identifier that was returned from the previous call to this
-- operation, which can be used to return the next set of items in the
-- list.
listNetworkProfilesResponse_nextToken :: Lens.Lens' ListNetworkProfilesResponse (Prelude.Maybe Prelude.Text)
listNetworkProfilesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListNetworkProfilesResponse -> f ListNetworkProfilesResponse
listNetworkProfilesResponse_nextToken = (ListNetworkProfilesResponse -> Maybe Text)
-> (ListNetworkProfilesResponse
    -> Maybe Text -> ListNetworkProfilesResponse)
-> Lens' ListNetworkProfilesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNetworkProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNetworkProfilesResponse' :: ListNetworkProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNetworkProfilesResponse
s@ListNetworkProfilesResponse' {} Maybe Text
a -> ListNetworkProfilesResponse
s {$sel:nextToken:ListNetworkProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListNetworkProfilesResponse)

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

instance Prelude.NFData ListNetworkProfilesResponse