{-# 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.IoTFleetWise.ListDecoderManifestNetworkInterfaces
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the network interfaces specified in a decoder manifest.
--
-- This API operation uses pagination. Specify the @nextToken@ parameter in
-- the request to return more results.
--
-- This operation returns paginated results.
module Amazonka.IoTFleetWise.ListDecoderManifestNetworkInterfaces
  ( -- * Creating a Request
    ListDecoderManifestNetworkInterfaces (..),
    newListDecoderManifestNetworkInterfaces,

    -- * Request Lenses
    listDecoderManifestNetworkInterfaces_maxResults,
    listDecoderManifestNetworkInterfaces_nextToken,
    listDecoderManifestNetworkInterfaces_name,

    -- * Destructuring the Response
    ListDecoderManifestNetworkInterfacesResponse (..),
    newListDecoderManifestNetworkInterfacesResponse,

    -- * Response Lenses
    listDecoderManifestNetworkInterfacesResponse_networkInterfaces,
    listDecoderManifestNetworkInterfacesResponse_nextToken,
    listDecoderManifestNetworkInterfacesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListDecoderManifestNetworkInterfaces' smart constructor.
data ListDecoderManifestNetworkInterfaces = ListDecoderManifestNetworkInterfaces'
  { -- | The maximum number of items to return, between 1 and 100, inclusive.
    ListDecoderManifestNetworkInterfaces -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token for the next set of results.
    --
    -- If the results of a search are large, only a portion of the results are
    -- returned, and a @nextToken@ pagination token is returned in the
    -- response. To retrieve the next set of results, reissue the search
    -- request and include the returned token. When all results have been
    -- returned, the response does not contain a pagination token value.
    ListDecoderManifestNetworkInterfaces -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the decoder manifest to list information about.
    ListDecoderManifestNetworkInterfaces -> Text
name :: Prelude.Text
  }
  deriving (ListDecoderManifestNetworkInterfaces
-> ListDecoderManifestNetworkInterfaces -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDecoderManifestNetworkInterfaces
-> ListDecoderManifestNetworkInterfaces -> Bool
$c/= :: ListDecoderManifestNetworkInterfaces
-> ListDecoderManifestNetworkInterfaces -> Bool
== :: ListDecoderManifestNetworkInterfaces
-> ListDecoderManifestNetworkInterfaces -> Bool
$c== :: ListDecoderManifestNetworkInterfaces
-> ListDecoderManifestNetworkInterfaces -> Bool
Prelude.Eq, ReadPrec [ListDecoderManifestNetworkInterfaces]
ReadPrec ListDecoderManifestNetworkInterfaces
Int -> ReadS ListDecoderManifestNetworkInterfaces
ReadS [ListDecoderManifestNetworkInterfaces]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDecoderManifestNetworkInterfaces]
$creadListPrec :: ReadPrec [ListDecoderManifestNetworkInterfaces]
readPrec :: ReadPrec ListDecoderManifestNetworkInterfaces
$creadPrec :: ReadPrec ListDecoderManifestNetworkInterfaces
readList :: ReadS [ListDecoderManifestNetworkInterfaces]
$creadList :: ReadS [ListDecoderManifestNetworkInterfaces]
readsPrec :: Int -> ReadS ListDecoderManifestNetworkInterfaces
$creadsPrec :: Int -> ReadS ListDecoderManifestNetworkInterfaces
Prelude.Read, Int -> ListDecoderManifestNetworkInterfaces -> ShowS
[ListDecoderManifestNetworkInterfaces] -> ShowS
ListDecoderManifestNetworkInterfaces -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDecoderManifestNetworkInterfaces] -> ShowS
$cshowList :: [ListDecoderManifestNetworkInterfaces] -> ShowS
show :: ListDecoderManifestNetworkInterfaces -> String
$cshow :: ListDecoderManifestNetworkInterfaces -> String
showsPrec :: Int -> ListDecoderManifestNetworkInterfaces -> ShowS
$cshowsPrec :: Int -> ListDecoderManifestNetworkInterfaces -> ShowS
Prelude.Show, forall x.
Rep ListDecoderManifestNetworkInterfaces x
-> ListDecoderManifestNetworkInterfaces
forall x.
ListDecoderManifestNetworkInterfaces
-> Rep ListDecoderManifestNetworkInterfaces x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDecoderManifestNetworkInterfaces x
-> ListDecoderManifestNetworkInterfaces
$cfrom :: forall x.
ListDecoderManifestNetworkInterfaces
-> Rep ListDecoderManifestNetworkInterfaces x
Prelude.Generic)

-- |
-- Create a value of 'ListDecoderManifestNetworkInterfaces' 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', 'listDecoderManifestNetworkInterfaces_maxResults' - The maximum number of items to return, between 1 and 100, inclusive.
--
-- 'nextToken', 'listDecoderManifestNetworkInterfaces_nextToken' - A pagination token for the next set of results.
--
-- If the results of a search are large, only a portion of the results are
-- returned, and a @nextToken@ pagination token is returned in the
-- response. To retrieve the next set of results, reissue the search
-- request and include the returned token. When all results have been
-- returned, the response does not contain a pagination token value.
--
-- 'name', 'listDecoderManifestNetworkInterfaces_name' - The name of the decoder manifest to list information about.
newListDecoderManifestNetworkInterfaces ::
  -- | 'name'
  Prelude.Text ->
  ListDecoderManifestNetworkInterfaces
newListDecoderManifestNetworkInterfaces :: Text -> ListDecoderManifestNetworkInterfaces
newListDecoderManifestNetworkInterfaces Text
pName_ =
  ListDecoderManifestNetworkInterfaces'
    { $sel:maxResults:ListDecoderManifestNetworkInterfaces' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDecoderManifestNetworkInterfaces' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListDecoderManifestNetworkInterfaces' :: Text
name = Text
pName_
    }

-- | The maximum number of items to return, between 1 and 100, inclusive.
listDecoderManifestNetworkInterfaces_maxResults :: Lens.Lens' ListDecoderManifestNetworkInterfaces (Prelude.Maybe Prelude.Natural)
listDecoderManifestNetworkInterfaces_maxResults :: Lens' ListDecoderManifestNetworkInterfaces (Maybe Natural)
listDecoderManifestNetworkInterfaces_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDecoderManifestNetworkInterfaces' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDecoderManifestNetworkInterfaces
s@ListDecoderManifestNetworkInterfaces' {} Maybe Natural
a -> ListDecoderManifestNetworkInterfaces
s {$sel:maxResults:ListDecoderManifestNetworkInterfaces' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDecoderManifestNetworkInterfaces)

-- | A pagination token for the next set of results.
--
-- If the results of a search are large, only a portion of the results are
-- returned, and a @nextToken@ pagination token is returned in the
-- response. To retrieve the next set of results, reissue the search
-- request and include the returned token. When all results have been
-- returned, the response does not contain a pagination token value.
listDecoderManifestNetworkInterfaces_nextToken :: Lens.Lens' ListDecoderManifestNetworkInterfaces (Prelude.Maybe Prelude.Text)
listDecoderManifestNetworkInterfaces_nextToken :: Lens' ListDecoderManifestNetworkInterfaces (Maybe Text)
listDecoderManifestNetworkInterfaces_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDecoderManifestNetworkInterfaces' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDecoderManifestNetworkInterfaces
s@ListDecoderManifestNetworkInterfaces' {} Maybe Text
a -> ListDecoderManifestNetworkInterfaces
s {$sel:nextToken:ListDecoderManifestNetworkInterfaces' :: Maybe Text
nextToken = Maybe Text
a} :: ListDecoderManifestNetworkInterfaces)

-- | The name of the decoder manifest to list information about.
listDecoderManifestNetworkInterfaces_name :: Lens.Lens' ListDecoderManifestNetworkInterfaces Prelude.Text
listDecoderManifestNetworkInterfaces_name :: Lens' ListDecoderManifestNetworkInterfaces Text
listDecoderManifestNetworkInterfaces_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDecoderManifestNetworkInterfaces' {Text
name :: Text
$sel:name:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Text
name} -> Text
name) (\s :: ListDecoderManifestNetworkInterfaces
s@ListDecoderManifestNetworkInterfaces' {} Text
a -> ListDecoderManifestNetworkInterfaces
s {$sel:name:ListDecoderManifestNetworkInterfaces' :: Text
name = Text
a} :: ListDecoderManifestNetworkInterfaces)

instance
  Core.AWSPager
    ListDecoderManifestNetworkInterfaces
  where
  page :: ListDecoderManifestNetworkInterfaces
-> AWSResponse ListDecoderManifestNetworkInterfaces
-> Maybe ListDecoderManifestNetworkInterfaces
page ListDecoderManifestNetworkInterfaces
rq AWSResponse ListDecoderManifestNetworkInterfaces
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDecoderManifestNetworkInterfaces
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDecoderManifestNetworkInterfacesResponse (Maybe Text)
listDecoderManifestNetworkInterfacesResponse_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 ListDecoderManifestNetworkInterfaces
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListDecoderManifestNetworkInterfacesResponse
  (Maybe (NonEmpty NetworkInterface))
listDecoderManifestNetworkInterfacesResponse_networkInterfaces
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall l. IsList l => l -> [Item l]
Prelude.toList
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListDecoderManifestNetworkInterfaces
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListDecoderManifestNetworkInterfaces (Maybe Text)
listDecoderManifestNetworkInterfaces_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDecoderManifestNetworkInterfaces
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDecoderManifestNetworkInterfacesResponse (Maybe Text)
listDecoderManifestNetworkInterfacesResponse_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
    ListDecoderManifestNetworkInterfaces
  where
  type
    AWSResponse ListDecoderManifestNetworkInterfaces =
      ListDecoderManifestNetworkInterfacesResponse
  request :: (Service -> Service)
-> ListDecoderManifestNetworkInterfaces
-> Request ListDecoderManifestNetworkInterfaces
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 ListDecoderManifestNetworkInterfaces
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse ListDecoderManifestNetworkInterfaces)))
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 (NonEmpty NetworkInterface)
-> Maybe Text
-> Int
-> ListDecoderManifestNetworkInterfacesResponse
ListDecoderManifestNetworkInterfacesResponse'
            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
"networkInterfaces")
            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
"nextToken")
            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
    ListDecoderManifestNetworkInterfaces
  where
  hashWithSalt :: Int -> ListDecoderManifestNetworkInterfaces -> Int
hashWithSalt
    Int
_salt
    ListDecoderManifestNetworkInterfaces' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Text
$sel:nextToken:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Maybe Text
$sel:maxResults:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> 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
name

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

instance
  Data.ToHeaders
    ListDecoderManifestNetworkInterfaces
  where
  toHeaders :: ListDecoderManifestNetworkInterfaces -> 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
"IoTAutobahnControlPlane.ListDecoderManifestNetworkInterfaces" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance
  Data.ToJSON
    ListDecoderManifestNetworkInterfaces
  where
  toJSON :: ListDecoderManifestNetworkInterfaces -> Value
toJSON ListDecoderManifestNetworkInterfaces' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Text
$sel:nextToken:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> Maybe Text
$sel:maxResults:ListDecoderManifestNetworkInterfaces' :: ListDecoderManifestNetworkInterfaces -> 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
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

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

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

-- | /See:/ 'newListDecoderManifestNetworkInterfacesResponse' smart constructor.
data ListDecoderManifestNetworkInterfacesResponse = ListDecoderManifestNetworkInterfacesResponse'
  { -- | A list of information about network interfaces.
    ListDecoderManifestNetworkInterfacesResponse
-> Maybe (NonEmpty NetworkInterface)
networkInterfaces :: Prelude.Maybe (Prelude.NonEmpty NetworkInterface),
    -- | The token to retrieve the next set of results, or @null@ if there are no
    -- more results.
    ListDecoderManifestNetworkInterfacesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDecoderManifestNetworkInterfacesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDecoderManifestNetworkInterfacesResponse
-> ListDecoderManifestNetworkInterfacesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDecoderManifestNetworkInterfacesResponse
-> ListDecoderManifestNetworkInterfacesResponse -> Bool
$c/= :: ListDecoderManifestNetworkInterfacesResponse
-> ListDecoderManifestNetworkInterfacesResponse -> Bool
== :: ListDecoderManifestNetworkInterfacesResponse
-> ListDecoderManifestNetworkInterfacesResponse -> Bool
$c== :: ListDecoderManifestNetworkInterfacesResponse
-> ListDecoderManifestNetworkInterfacesResponse -> Bool
Prelude.Eq, ReadPrec [ListDecoderManifestNetworkInterfacesResponse]
ReadPrec ListDecoderManifestNetworkInterfacesResponse
Int -> ReadS ListDecoderManifestNetworkInterfacesResponse
ReadS [ListDecoderManifestNetworkInterfacesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDecoderManifestNetworkInterfacesResponse]
$creadListPrec :: ReadPrec [ListDecoderManifestNetworkInterfacesResponse]
readPrec :: ReadPrec ListDecoderManifestNetworkInterfacesResponse
$creadPrec :: ReadPrec ListDecoderManifestNetworkInterfacesResponse
readList :: ReadS [ListDecoderManifestNetworkInterfacesResponse]
$creadList :: ReadS [ListDecoderManifestNetworkInterfacesResponse]
readsPrec :: Int -> ReadS ListDecoderManifestNetworkInterfacesResponse
$creadsPrec :: Int -> ReadS ListDecoderManifestNetworkInterfacesResponse
Prelude.Read, Int -> ListDecoderManifestNetworkInterfacesResponse -> ShowS
[ListDecoderManifestNetworkInterfacesResponse] -> ShowS
ListDecoderManifestNetworkInterfacesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDecoderManifestNetworkInterfacesResponse] -> ShowS
$cshowList :: [ListDecoderManifestNetworkInterfacesResponse] -> ShowS
show :: ListDecoderManifestNetworkInterfacesResponse -> String
$cshow :: ListDecoderManifestNetworkInterfacesResponse -> String
showsPrec :: Int -> ListDecoderManifestNetworkInterfacesResponse -> ShowS
$cshowsPrec :: Int -> ListDecoderManifestNetworkInterfacesResponse -> ShowS
Prelude.Show, forall x.
Rep ListDecoderManifestNetworkInterfacesResponse x
-> ListDecoderManifestNetworkInterfacesResponse
forall x.
ListDecoderManifestNetworkInterfacesResponse
-> Rep ListDecoderManifestNetworkInterfacesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDecoderManifestNetworkInterfacesResponse x
-> ListDecoderManifestNetworkInterfacesResponse
$cfrom :: forall x.
ListDecoderManifestNetworkInterfacesResponse
-> Rep ListDecoderManifestNetworkInterfacesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDecoderManifestNetworkInterfacesResponse' 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:
--
-- 'networkInterfaces', 'listDecoderManifestNetworkInterfacesResponse_networkInterfaces' - A list of information about network interfaces.
--
-- 'nextToken', 'listDecoderManifestNetworkInterfacesResponse_nextToken' - The token to retrieve the next set of results, or @null@ if there are no
-- more results.
--
-- 'httpStatus', 'listDecoderManifestNetworkInterfacesResponse_httpStatus' - The response's http status code.
newListDecoderManifestNetworkInterfacesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDecoderManifestNetworkInterfacesResponse
newListDecoderManifestNetworkInterfacesResponse :: Int -> ListDecoderManifestNetworkInterfacesResponse
newListDecoderManifestNetworkInterfacesResponse
  Int
pHttpStatus_ =
    ListDecoderManifestNetworkInterfacesResponse'
      { $sel:networkInterfaces:ListDecoderManifestNetworkInterfacesResponse' :: Maybe (NonEmpty NetworkInterface)
networkInterfaces =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListDecoderManifestNetworkInterfacesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListDecoderManifestNetworkInterfacesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A list of information about network interfaces.
listDecoderManifestNetworkInterfacesResponse_networkInterfaces :: Lens.Lens' ListDecoderManifestNetworkInterfacesResponse (Prelude.Maybe (Prelude.NonEmpty NetworkInterface))
listDecoderManifestNetworkInterfacesResponse_networkInterfaces :: Lens'
  ListDecoderManifestNetworkInterfacesResponse
  (Maybe (NonEmpty NetworkInterface))
listDecoderManifestNetworkInterfacesResponse_networkInterfaces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDecoderManifestNetworkInterfacesResponse' {Maybe (NonEmpty NetworkInterface)
networkInterfaces :: Maybe (NonEmpty NetworkInterface)
$sel:networkInterfaces:ListDecoderManifestNetworkInterfacesResponse' :: ListDecoderManifestNetworkInterfacesResponse
-> Maybe (NonEmpty NetworkInterface)
networkInterfaces} -> Maybe (NonEmpty NetworkInterface)
networkInterfaces) (\s :: ListDecoderManifestNetworkInterfacesResponse
s@ListDecoderManifestNetworkInterfacesResponse' {} Maybe (NonEmpty NetworkInterface)
a -> ListDecoderManifestNetworkInterfacesResponse
s {$sel:networkInterfaces:ListDecoderManifestNetworkInterfacesResponse' :: Maybe (NonEmpty NetworkInterface)
networkInterfaces = Maybe (NonEmpty NetworkInterface)
a} :: ListDecoderManifestNetworkInterfacesResponse) 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 token to retrieve the next set of results, or @null@ if there are no
-- more results.
listDecoderManifestNetworkInterfacesResponse_nextToken :: Lens.Lens' ListDecoderManifestNetworkInterfacesResponse (Prelude.Maybe Prelude.Text)
listDecoderManifestNetworkInterfacesResponse_nextToken :: Lens' ListDecoderManifestNetworkInterfacesResponse (Maybe Text)
listDecoderManifestNetworkInterfacesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDecoderManifestNetworkInterfacesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDecoderManifestNetworkInterfacesResponse' :: ListDecoderManifestNetworkInterfacesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDecoderManifestNetworkInterfacesResponse
s@ListDecoderManifestNetworkInterfacesResponse' {} Maybe Text
a -> ListDecoderManifestNetworkInterfacesResponse
s {$sel:nextToken:ListDecoderManifestNetworkInterfacesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDecoderManifestNetworkInterfacesResponse)

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

instance
  Prelude.NFData
    ListDecoderManifestNetworkInterfacesResponse
  where
  rnf :: ListDecoderManifestNetworkInterfacesResponse -> ()
rnf ListDecoderManifestNetworkInterfacesResponse' {Int
Maybe (NonEmpty NetworkInterface)
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
networkInterfaces :: Maybe (NonEmpty NetworkInterface)
$sel:httpStatus:ListDecoderManifestNetworkInterfacesResponse' :: ListDecoderManifestNetworkInterfacesResponse -> Int
$sel:nextToken:ListDecoderManifestNetworkInterfacesResponse' :: ListDecoderManifestNetworkInterfacesResponse -> Maybe Text
$sel:networkInterfaces:ListDecoderManifestNetworkInterfacesResponse' :: ListDecoderManifestNetworkInterfacesResponse
-> Maybe (NonEmpty NetworkInterface)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty NetworkInterface)
networkInterfaces
      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 Int
httpStatus