{-# 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.EC2.DescribeLocalGatewayVirtualInterfaces
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified local gateway virtual interfaces.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeLocalGatewayVirtualInterfaces
  ( -- * Creating a Request
    DescribeLocalGatewayVirtualInterfaces (..),
    newDescribeLocalGatewayVirtualInterfaces,

    -- * Request Lenses
    describeLocalGatewayVirtualInterfaces_dryRun,
    describeLocalGatewayVirtualInterfaces_filters,
    describeLocalGatewayVirtualInterfaces_localGatewayVirtualInterfaceIds,
    describeLocalGatewayVirtualInterfaces_maxResults,
    describeLocalGatewayVirtualInterfaces_nextToken,

    -- * Destructuring the Response
    DescribeLocalGatewayVirtualInterfacesResponse (..),
    newDescribeLocalGatewayVirtualInterfacesResponse,

    -- * Response Lenses
    describeLocalGatewayVirtualInterfacesResponse_localGatewayVirtualInterfaces,
    describeLocalGatewayVirtualInterfacesResponse_nextToken,
    describeLocalGatewayVirtualInterfacesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeLocalGatewayVirtualInterfaces' smart constructor.
data DescribeLocalGatewayVirtualInterfaces = DescribeLocalGatewayVirtualInterfaces'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DescribeLocalGatewayVirtualInterfaces -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters.
    --
    -- -   @local-address@ - The local address.
    --
    -- -   @local-bgp-asn@ - The Border Gateway Protocol (BGP) Autonomous
    --     System Number (ASN) of the local gateway.
    --
    -- -   @local-gateway-id@ - The ID of the local gateway.
    --
    -- -   @local-gateway-virtual-interface-id@ - The ID of the virtual
    --     interface.
    --
    -- -   @owner-id@ - The ID of the Amazon Web Services account that owns the
    --     local gateway virtual interface.
    --
    -- -   @peer-address@ - The peer address.
    --
    -- -   @peer-bgp-asn@ - The peer BGP ASN.
    --
    -- -   @vlan@ - The ID of the VLAN.
    DescribeLocalGatewayVirtualInterfaces -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The IDs of the virtual interfaces.
    DescribeLocalGatewayVirtualInterfaces -> Maybe [Text]
localGatewayVirtualInterfaceIds :: Prelude.Maybe [Prelude.Text],
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    DescribeLocalGatewayVirtualInterfaces -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next page of results.
    DescribeLocalGatewayVirtualInterfaces -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeLocalGatewayVirtualInterfaces
-> DescribeLocalGatewayVirtualInterfaces -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLocalGatewayVirtualInterfaces
-> DescribeLocalGatewayVirtualInterfaces -> Bool
$c/= :: DescribeLocalGatewayVirtualInterfaces
-> DescribeLocalGatewayVirtualInterfaces -> Bool
== :: DescribeLocalGatewayVirtualInterfaces
-> DescribeLocalGatewayVirtualInterfaces -> Bool
$c== :: DescribeLocalGatewayVirtualInterfaces
-> DescribeLocalGatewayVirtualInterfaces -> Bool
Prelude.Eq, ReadPrec [DescribeLocalGatewayVirtualInterfaces]
ReadPrec DescribeLocalGatewayVirtualInterfaces
Int -> ReadS DescribeLocalGatewayVirtualInterfaces
ReadS [DescribeLocalGatewayVirtualInterfaces]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLocalGatewayVirtualInterfaces]
$creadListPrec :: ReadPrec [DescribeLocalGatewayVirtualInterfaces]
readPrec :: ReadPrec DescribeLocalGatewayVirtualInterfaces
$creadPrec :: ReadPrec DescribeLocalGatewayVirtualInterfaces
readList :: ReadS [DescribeLocalGatewayVirtualInterfaces]
$creadList :: ReadS [DescribeLocalGatewayVirtualInterfaces]
readsPrec :: Int -> ReadS DescribeLocalGatewayVirtualInterfaces
$creadsPrec :: Int -> ReadS DescribeLocalGatewayVirtualInterfaces
Prelude.Read, Int -> DescribeLocalGatewayVirtualInterfaces -> ShowS
[DescribeLocalGatewayVirtualInterfaces] -> ShowS
DescribeLocalGatewayVirtualInterfaces -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLocalGatewayVirtualInterfaces] -> ShowS
$cshowList :: [DescribeLocalGatewayVirtualInterfaces] -> ShowS
show :: DescribeLocalGatewayVirtualInterfaces -> String
$cshow :: DescribeLocalGatewayVirtualInterfaces -> String
showsPrec :: Int -> DescribeLocalGatewayVirtualInterfaces -> ShowS
$cshowsPrec :: Int -> DescribeLocalGatewayVirtualInterfaces -> ShowS
Prelude.Show, forall x.
Rep DescribeLocalGatewayVirtualInterfaces x
-> DescribeLocalGatewayVirtualInterfaces
forall x.
DescribeLocalGatewayVirtualInterfaces
-> Rep DescribeLocalGatewayVirtualInterfaces x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLocalGatewayVirtualInterfaces x
-> DescribeLocalGatewayVirtualInterfaces
$cfrom :: forall x.
DescribeLocalGatewayVirtualInterfaces
-> Rep DescribeLocalGatewayVirtualInterfaces x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLocalGatewayVirtualInterfaces' 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:
--
-- 'dryRun', 'describeLocalGatewayVirtualInterfaces_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'filters', 'describeLocalGatewayVirtualInterfaces_filters' - One or more filters.
--
-- -   @local-address@ - The local address.
--
-- -   @local-bgp-asn@ - The Border Gateway Protocol (BGP) Autonomous
--     System Number (ASN) of the local gateway.
--
-- -   @local-gateway-id@ - The ID of the local gateway.
--
-- -   @local-gateway-virtual-interface-id@ - The ID of the virtual
--     interface.
--
-- -   @owner-id@ - The ID of the Amazon Web Services account that owns the
--     local gateway virtual interface.
--
-- -   @peer-address@ - The peer address.
--
-- -   @peer-bgp-asn@ - The peer BGP ASN.
--
-- -   @vlan@ - The ID of the VLAN.
--
-- 'localGatewayVirtualInterfaceIds', 'describeLocalGatewayVirtualInterfaces_localGatewayVirtualInterfaceIds' - The IDs of the virtual interfaces.
--
-- 'maxResults', 'describeLocalGatewayVirtualInterfaces_maxResults' - The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- 'nextToken', 'describeLocalGatewayVirtualInterfaces_nextToken' - The token for the next page of results.
newDescribeLocalGatewayVirtualInterfaces ::
  DescribeLocalGatewayVirtualInterfaces
newDescribeLocalGatewayVirtualInterfaces :: DescribeLocalGatewayVirtualInterfaces
newDescribeLocalGatewayVirtualInterfaces =
  DescribeLocalGatewayVirtualInterfaces'
    { $sel:dryRun:DescribeLocalGatewayVirtualInterfaces' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeLocalGatewayVirtualInterfaces' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:localGatewayVirtualInterfaceIds:DescribeLocalGatewayVirtualInterfaces' :: Maybe [Text]
localGatewayVirtualInterfaceIds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeLocalGatewayVirtualInterfaces' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeLocalGatewayVirtualInterfaces' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
describeLocalGatewayVirtualInterfaces_dryRun :: Lens.Lens' DescribeLocalGatewayVirtualInterfaces (Prelude.Maybe Prelude.Bool)
describeLocalGatewayVirtualInterfaces_dryRun :: Lens' DescribeLocalGatewayVirtualInterfaces (Maybe Bool)
describeLocalGatewayVirtualInterfaces_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfaces' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeLocalGatewayVirtualInterfaces
s@DescribeLocalGatewayVirtualInterfaces' {} Maybe Bool
a -> DescribeLocalGatewayVirtualInterfaces
s {$sel:dryRun:DescribeLocalGatewayVirtualInterfaces' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeLocalGatewayVirtualInterfaces)

-- | One or more filters.
--
-- -   @local-address@ - The local address.
--
-- -   @local-bgp-asn@ - The Border Gateway Protocol (BGP) Autonomous
--     System Number (ASN) of the local gateway.
--
-- -   @local-gateway-id@ - The ID of the local gateway.
--
-- -   @local-gateway-virtual-interface-id@ - The ID of the virtual
--     interface.
--
-- -   @owner-id@ - The ID of the Amazon Web Services account that owns the
--     local gateway virtual interface.
--
-- -   @peer-address@ - The peer address.
--
-- -   @peer-bgp-asn@ - The peer BGP ASN.
--
-- -   @vlan@ - The ID of the VLAN.
describeLocalGatewayVirtualInterfaces_filters :: Lens.Lens' DescribeLocalGatewayVirtualInterfaces (Prelude.Maybe [Filter])
describeLocalGatewayVirtualInterfaces_filters :: Lens' DescribeLocalGatewayVirtualInterfaces (Maybe [Filter])
describeLocalGatewayVirtualInterfaces_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfaces' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeLocalGatewayVirtualInterfaces
s@DescribeLocalGatewayVirtualInterfaces' {} Maybe [Filter]
a -> DescribeLocalGatewayVirtualInterfaces
s {$sel:filters:DescribeLocalGatewayVirtualInterfaces' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeLocalGatewayVirtualInterfaces) 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 IDs of the virtual interfaces.
describeLocalGatewayVirtualInterfaces_localGatewayVirtualInterfaceIds :: Lens.Lens' DescribeLocalGatewayVirtualInterfaces (Prelude.Maybe [Prelude.Text])
describeLocalGatewayVirtualInterfaces_localGatewayVirtualInterfaceIds :: Lens' DescribeLocalGatewayVirtualInterfaces (Maybe [Text])
describeLocalGatewayVirtualInterfaces_localGatewayVirtualInterfaceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfaces' {Maybe [Text]
localGatewayVirtualInterfaceIds :: Maybe [Text]
$sel:localGatewayVirtualInterfaceIds:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe [Text]
localGatewayVirtualInterfaceIds} -> Maybe [Text]
localGatewayVirtualInterfaceIds) (\s :: DescribeLocalGatewayVirtualInterfaces
s@DescribeLocalGatewayVirtualInterfaces' {} Maybe [Text]
a -> DescribeLocalGatewayVirtualInterfaces
s {$sel:localGatewayVirtualInterfaceIds:DescribeLocalGatewayVirtualInterfaces' :: Maybe [Text]
localGatewayVirtualInterfaceIds = Maybe [Text]
a} :: DescribeLocalGatewayVirtualInterfaces) 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 return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
describeLocalGatewayVirtualInterfaces_maxResults :: Lens.Lens' DescribeLocalGatewayVirtualInterfaces (Prelude.Maybe Prelude.Natural)
describeLocalGatewayVirtualInterfaces_maxResults :: Lens' DescribeLocalGatewayVirtualInterfaces (Maybe Natural)
describeLocalGatewayVirtualInterfaces_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfaces' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeLocalGatewayVirtualInterfaces
s@DescribeLocalGatewayVirtualInterfaces' {} Maybe Natural
a -> DescribeLocalGatewayVirtualInterfaces
s {$sel:maxResults:DescribeLocalGatewayVirtualInterfaces' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeLocalGatewayVirtualInterfaces)

-- | The token for the next page of results.
describeLocalGatewayVirtualInterfaces_nextToken :: Lens.Lens' DescribeLocalGatewayVirtualInterfaces (Prelude.Maybe Prelude.Text)
describeLocalGatewayVirtualInterfaces_nextToken :: Lens' DescribeLocalGatewayVirtualInterfaces (Maybe Text)
describeLocalGatewayVirtualInterfaces_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfaces' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeLocalGatewayVirtualInterfaces
s@DescribeLocalGatewayVirtualInterfaces' {} Maybe Text
a -> DescribeLocalGatewayVirtualInterfaces
s {$sel:nextToken:DescribeLocalGatewayVirtualInterfaces' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeLocalGatewayVirtualInterfaces)

instance
  Core.AWSPager
    DescribeLocalGatewayVirtualInterfaces
  where
  page :: DescribeLocalGatewayVirtualInterfaces
-> AWSResponse DescribeLocalGatewayVirtualInterfaces
-> Maybe DescribeLocalGatewayVirtualInterfaces
page DescribeLocalGatewayVirtualInterfaces
rq AWSResponse DescribeLocalGatewayVirtualInterfaces
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeLocalGatewayVirtualInterfaces
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeLocalGatewayVirtualInterfacesResponse (Maybe Text)
describeLocalGatewayVirtualInterfacesResponse_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 DescribeLocalGatewayVirtualInterfaces
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeLocalGatewayVirtualInterfacesResponse
  (Maybe [LocalGatewayVirtualInterface])
describeLocalGatewayVirtualInterfacesResponse_localGatewayVirtualInterfaces
            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.$ DescribeLocalGatewayVirtualInterfaces
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeLocalGatewayVirtualInterfaces (Maybe Text)
describeLocalGatewayVirtualInterfaces_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeLocalGatewayVirtualInterfaces
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeLocalGatewayVirtualInterfacesResponse (Maybe Text)
describeLocalGatewayVirtualInterfacesResponse_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
    DescribeLocalGatewayVirtualInterfaces
  where
  type
    AWSResponse
      DescribeLocalGatewayVirtualInterfaces =
      DescribeLocalGatewayVirtualInterfacesResponse
  request :: (Service -> Service)
-> DescribeLocalGatewayVirtualInterfaces
-> Request DescribeLocalGatewayVirtualInterfaces
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeLocalGatewayVirtualInterfaces
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeLocalGatewayVirtualInterfaces)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [LocalGatewayVirtualInterface]
-> Maybe Text
-> Int
-> DescribeLocalGatewayVirtualInterfacesResponse
DescribeLocalGatewayVirtualInterfacesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"localGatewayVirtualInterfaceSet"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"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
    DescribeLocalGatewayVirtualInterfaces
  where
  hashWithSalt :: Int -> DescribeLocalGatewayVirtualInterfaces -> Int
hashWithSalt
    Int
_salt
    DescribeLocalGatewayVirtualInterfaces' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
localGatewayVirtualInterfaceIds :: Maybe [Text]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Text
$sel:maxResults:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Natural
$sel:localGatewayVirtualInterfaceIds:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe [Text]
$sel:filters:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe [Filter]
$sel:dryRun:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
localGatewayVirtualInterfaceIds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

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

instance
  Data.ToHeaders
    DescribeLocalGatewayVirtualInterfaces
  where
  toHeaders :: DescribeLocalGatewayVirtualInterfaces -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

instance
  Data.ToQuery
    DescribeLocalGatewayVirtualInterfaces
  where
  toQuery :: DescribeLocalGatewayVirtualInterfaces -> QueryString
toQuery DescribeLocalGatewayVirtualInterfaces' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
localGatewayVirtualInterfaceIds :: Maybe [Text]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Text
$sel:maxResults:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Natural
$sel:localGatewayVirtualInterfaceIds:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe [Text]
$sel:filters:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe [Filter]
$sel:dryRun:DescribeLocalGatewayVirtualInterfaces' :: DescribeLocalGatewayVirtualInterfaces -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeLocalGatewayVirtualInterfaces" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"LocalGatewayVirtualInterfaceId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
localGatewayVirtualInterfaceIds
          ),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newDescribeLocalGatewayVirtualInterfacesResponse' smart constructor.
data DescribeLocalGatewayVirtualInterfacesResponse = DescribeLocalGatewayVirtualInterfacesResponse'
  { -- | Information about the virtual interfaces.
    DescribeLocalGatewayVirtualInterfacesResponse
-> Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces :: Prelude.Maybe [LocalGatewayVirtualInterface],
    -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribeLocalGatewayVirtualInterfacesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeLocalGatewayVirtualInterfacesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeLocalGatewayVirtualInterfacesResponse
-> DescribeLocalGatewayVirtualInterfacesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLocalGatewayVirtualInterfacesResponse
-> DescribeLocalGatewayVirtualInterfacesResponse -> Bool
$c/= :: DescribeLocalGatewayVirtualInterfacesResponse
-> DescribeLocalGatewayVirtualInterfacesResponse -> Bool
== :: DescribeLocalGatewayVirtualInterfacesResponse
-> DescribeLocalGatewayVirtualInterfacesResponse -> Bool
$c== :: DescribeLocalGatewayVirtualInterfacesResponse
-> DescribeLocalGatewayVirtualInterfacesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeLocalGatewayVirtualInterfacesResponse]
ReadPrec DescribeLocalGatewayVirtualInterfacesResponse
Int -> ReadS DescribeLocalGatewayVirtualInterfacesResponse
ReadS [DescribeLocalGatewayVirtualInterfacesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLocalGatewayVirtualInterfacesResponse]
$creadListPrec :: ReadPrec [DescribeLocalGatewayVirtualInterfacesResponse]
readPrec :: ReadPrec DescribeLocalGatewayVirtualInterfacesResponse
$creadPrec :: ReadPrec DescribeLocalGatewayVirtualInterfacesResponse
readList :: ReadS [DescribeLocalGatewayVirtualInterfacesResponse]
$creadList :: ReadS [DescribeLocalGatewayVirtualInterfacesResponse]
readsPrec :: Int -> ReadS DescribeLocalGatewayVirtualInterfacesResponse
$creadsPrec :: Int -> ReadS DescribeLocalGatewayVirtualInterfacesResponse
Prelude.Read, Int -> DescribeLocalGatewayVirtualInterfacesResponse -> ShowS
[DescribeLocalGatewayVirtualInterfacesResponse] -> ShowS
DescribeLocalGatewayVirtualInterfacesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLocalGatewayVirtualInterfacesResponse] -> ShowS
$cshowList :: [DescribeLocalGatewayVirtualInterfacesResponse] -> ShowS
show :: DescribeLocalGatewayVirtualInterfacesResponse -> String
$cshow :: DescribeLocalGatewayVirtualInterfacesResponse -> String
showsPrec :: Int -> DescribeLocalGatewayVirtualInterfacesResponse -> ShowS
$cshowsPrec :: Int -> DescribeLocalGatewayVirtualInterfacesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeLocalGatewayVirtualInterfacesResponse x
-> DescribeLocalGatewayVirtualInterfacesResponse
forall x.
DescribeLocalGatewayVirtualInterfacesResponse
-> Rep DescribeLocalGatewayVirtualInterfacesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLocalGatewayVirtualInterfacesResponse x
-> DescribeLocalGatewayVirtualInterfacesResponse
$cfrom :: forall x.
DescribeLocalGatewayVirtualInterfacesResponse
-> Rep DescribeLocalGatewayVirtualInterfacesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLocalGatewayVirtualInterfacesResponse' 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:
--
-- 'localGatewayVirtualInterfaces', 'describeLocalGatewayVirtualInterfacesResponse_localGatewayVirtualInterfaces' - Information about the virtual interfaces.
--
-- 'nextToken', 'describeLocalGatewayVirtualInterfacesResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'describeLocalGatewayVirtualInterfacesResponse_httpStatus' - The response's http status code.
newDescribeLocalGatewayVirtualInterfacesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeLocalGatewayVirtualInterfacesResponse
newDescribeLocalGatewayVirtualInterfacesResponse :: Int -> DescribeLocalGatewayVirtualInterfacesResponse
newDescribeLocalGatewayVirtualInterfacesResponse
  Int
pHttpStatus_ =
    DescribeLocalGatewayVirtualInterfacesResponse'
      { $sel:localGatewayVirtualInterfaces:DescribeLocalGatewayVirtualInterfacesResponse' :: Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeLocalGatewayVirtualInterfacesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeLocalGatewayVirtualInterfacesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Information about the virtual interfaces.
describeLocalGatewayVirtualInterfacesResponse_localGatewayVirtualInterfaces :: Lens.Lens' DescribeLocalGatewayVirtualInterfacesResponse (Prelude.Maybe [LocalGatewayVirtualInterface])
describeLocalGatewayVirtualInterfacesResponse_localGatewayVirtualInterfaces :: Lens'
  DescribeLocalGatewayVirtualInterfacesResponse
  (Maybe [LocalGatewayVirtualInterface])
describeLocalGatewayVirtualInterfacesResponse_localGatewayVirtualInterfaces = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfacesResponse' {Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces :: Maybe [LocalGatewayVirtualInterface]
$sel:localGatewayVirtualInterfaces:DescribeLocalGatewayVirtualInterfacesResponse' :: DescribeLocalGatewayVirtualInterfacesResponse
-> Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces} -> Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces) (\s :: DescribeLocalGatewayVirtualInterfacesResponse
s@DescribeLocalGatewayVirtualInterfacesResponse' {} Maybe [LocalGatewayVirtualInterface]
a -> DescribeLocalGatewayVirtualInterfacesResponse
s {$sel:localGatewayVirtualInterfaces:DescribeLocalGatewayVirtualInterfacesResponse' :: Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces = Maybe [LocalGatewayVirtualInterface]
a} :: DescribeLocalGatewayVirtualInterfacesResponse) 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 use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describeLocalGatewayVirtualInterfacesResponse_nextToken :: Lens.Lens' DescribeLocalGatewayVirtualInterfacesResponse (Prelude.Maybe Prelude.Text)
describeLocalGatewayVirtualInterfacesResponse_nextToken :: Lens' DescribeLocalGatewayVirtualInterfacesResponse (Maybe Text)
describeLocalGatewayVirtualInterfacesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocalGatewayVirtualInterfacesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeLocalGatewayVirtualInterfacesResponse' :: DescribeLocalGatewayVirtualInterfacesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeLocalGatewayVirtualInterfacesResponse
s@DescribeLocalGatewayVirtualInterfacesResponse' {} Maybe Text
a -> DescribeLocalGatewayVirtualInterfacesResponse
s {$sel:nextToken:DescribeLocalGatewayVirtualInterfacesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeLocalGatewayVirtualInterfacesResponse)

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

instance
  Prelude.NFData
    DescribeLocalGatewayVirtualInterfacesResponse
  where
  rnf :: DescribeLocalGatewayVirtualInterfacesResponse -> ()
rnf
    DescribeLocalGatewayVirtualInterfacesResponse' {Int
Maybe [LocalGatewayVirtualInterface]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
localGatewayVirtualInterfaces :: Maybe [LocalGatewayVirtualInterface]
$sel:httpStatus:DescribeLocalGatewayVirtualInterfacesResponse' :: DescribeLocalGatewayVirtualInterfacesResponse -> Int
$sel:nextToken:DescribeLocalGatewayVirtualInterfacesResponse' :: DescribeLocalGatewayVirtualInterfacesResponse -> Maybe Text
$sel:localGatewayVirtualInterfaces:DescribeLocalGatewayVirtualInterfacesResponse' :: DescribeLocalGatewayVirtualInterfacesResponse
-> Maybe [LocalGatewayVirtualInterface]
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe [LocalGatewayVirtualInterface]
localGatewayVirtualInterfaces
        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