{-# 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.DescribeVpnGateways
-- 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 one or more of your virtual private gateways.
--
-- For more information, see
-- <https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html Amazon Web Services Site-to-Site VPN>
-- in the /Amazon Web Services Site-to-Site VPN User Guide/.
module Amazonka.EC2.DescribeVpnGateways
  ( -- * Creating a Request
    DescribeVpnGateways (..),
    newDescribeVpnGateways,

    -- * Request Lenses
    describeVpnGateways_dryRun,
    describeVpnGateways_filters,
    describeVpnGateways_vpnGatewayIds,

    -- * Destructuring the Response
    DescribeVpnGatewaysResponse (..),
    newDescribeVpnGatewaysResponse,

    -- * Response Lenses
    describeVpnGatewaysResponse_vpnGateways,
    describeVpnGatewaysResponse_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

-- | Contains the parameters for DescribeVpnGateways.
--
-- /See:/ 'newDescribeVpnGateways' smart constructor.
data DescribeVpnGateways = DescribeVpnGateways'
  { -- | 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@.
    DescribeVpnGateways -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters.
    --
    -- -   @amazon-side-asn@ - The Autonomous System Number (ASN) for the
    --     Amazon side of the gateway.
    --
    -- -   @attachment.state@ - The current state of the attachment between the
    --     gateway and the VPC (@attaching@ | @attached@ | @detaching@ |
    --     @detached@).
    --
    -- -   @attachment.vpc-id@ - The ID of an attached VPC.
    --
    -- -   @availability-zone@ - The Availability Zone for the virtual private
    --     gateway (if applicable).
    --
    -- -   @state@ - The state of the virtual private gateway (@pending@ |
    --     @available@ | @deleting@ | @deleted@).
    --
    -- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
    --     resource. Use the tag key in the filter name and the tag value as
    --     the filter value. For example, to find all resources that have a tag
    --     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
    --     the filter name and @TeamA@ for the filter value.
    --
    -- -   @tag-key@ - The key of a tag assigned to the resource. Use this
    --     filter to find all resources assigned a tag with a specific key,
    --     regardless of the tag value.
    --
    -- -   @type@ - The type of virtual private gateway. Currently the only
    --     supported type is @ipsec.1@.
    --
    -- -   @vpn-gateway-id@ - The ID of the virtual private gateway.
    DescribeVpnGateways -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | One or more virtual private gateway IDs.
    --
    -- Default: Describes all your virtual private gateways.
    DescribeVpnGateways -> Maybe [Text]
vpnGatewayIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeVpnGateways -> DescribeVpnGateways -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpnGateways -> DescribeVpnGateways -> Bool
$c/= :: DescribeVpnGateways -> DescribeVpnGateways -> Bool
== :: DescribeVpnGateways -> DescribeVpnGateways -> Bool
$c== :: DescribeVpnGateways -> DescribeVpnGateways -> Bool
Prelude.Eq, ReadPrec [DescribeVpnGateways]
ReadPrec DescribeVpnGateways
Int -> ReadS DescribeVpnGateways
ReadS [DescribeVpnGateways]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpnGateways]
$creadListPrec :: ReadPrec [DescribeVpnGateways]
readPrec :: ReadPrec DescribeVpnGateways
$creadPrec :: ReadPrec DescribeVpnGateways
readList :: ReadS [DescribeVpnGateways]
$creadList :: ReadS [DescribeVpnGateways]
readsPrec :: Int -> ReadS DescribeVpnGateways
$creadsPrec :: Int -> ReadS DescribeVpnGateways
Prelude.Read, Int -> DescribeVpnGateways -> ShowS
[DescribeVpnGateways] -> ShowS
DescribeVpnGateways -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpnGateways] -> ShowS
$cshowList :: [DescribeVpnGateways] -> ShowS
show :: DescribeVpnGateways -> String
$cshow :: DescribeVpnGateways -> String
showsPrec :: Int -> DescribeVpnGateways -> ShowS
$cshowsPrec :: Int -> DescribeVpnGateways -> ShowS
Prelude.Show, forall x. Rep DescribeVpnGateways x -> DescribeVpnGateways
forall x. DescribeVpnGateways -> Rep DescribeVpnGateways x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeVpnGateways x -> DescribeVpnGateways
$cfrom :: forall x. DescribeVpnGateways -> Rep DescribeVpnGateways x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVpnGateways' 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', 'describeVpnGateways_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', 'describeVpnGateways_filters' - One or more filters.
--
-- -   @amazon-side-asn@ - The Autonomous System Number (ASN) for the
--     Amazon side of the gateway.
--
-- -   @attachment.state@ - The current state of the attachment between the
--     gateway and the VPC (@attaching@ | @attached@ | @detaching@ |
--     @detached@).
--
-- -   @attachment.vpc-id@ - The ID of an attached VPC.
--
-- -   @availability-zone@ - The Availability Zone for the virtual private
--     gateway (if applicable).
--
-- -   @state@ - The state of the virtual private gateway (@pending@ |
--     @available@ | @deleting@ | @deleted@).
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- -   @type@ - The type of virtual private gateway. Currently the only
--     supported type is @ipsec.1@.
--
-- -   @vpn-gateway-id@ - The ID of the virtual private gateway.
--
-- 'vpnGatewayIds', 'describeVpnGateways_vpnGatewayIds' - One or more virtual private gateway IDs.
--
-- Default: Describes all your virtual private gateways.
newDescribeVpnGateways ::
  DescribeVpnGateways
newDescribeVpnGateways :: DescribeVpnGateways
newDescribeVpnGateways =
  DescribeVpnGateways'
    { $sel:dryRun:DescribeVpnGateways' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeVpnGateways' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:vpnGatewayIds:DescribeVpnGateways' :: Maybe [Text]
vpnGatewayIds = 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@.
describeVpnGateways_dryRun :: Lens.Lens' DescribeVpnGateways (Prelude.Maybe Prelude.Bool)
describeVpnGateways_dryRun :: Lens' DescribeVpnGateways (Maybe Bool)
describeVpnGateways_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpnGateways' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeVpnGateways
s@DescribeVpnGateways' {} Maybe Bool
a -> DescribeVpnGateways
s {$sel:dryRun:DescribeVpnGateways' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeVpnGateways)

-- | One or more filters.
--
-- -   @amazon-side-asn@ - The Autonomous System Number (ASN) for the
--     Amazon side of the gateway.
--
-- -   @attachment.state@ - The current state of the attachment between the
--     gateway and the VPC (@attaching@ | @attached@ | @detaching@ |
--     @detached@).
--
-- -   @attachment.vpc-id@ - The ID of an attached VPC.
--
-- -   @availability-zone@ - The Availability Zone for the virtual private
--     gateway (if applicable).
--
-- -   @state@ - The state of the virtual private gateway (@pending@ |
--     @available@ | @deleting@ | @deleted@).
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- -   @type@ - The type of virtual private gateway. Currently the only
--     supported type is @ipsec.1@.
--
-- -   @vpn-gateway-id@ - The ID of the virtual private gateway.
describeVpnGateways_filters :: Lens.Lens' DescribeVpnGateways (Prelude.Maybe [Filter])
describeVpnGateways_filters :: Lens' DescribeVpnGateways (Maybe [Filter])
describeVpnGateways_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpnGateways' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeVpnGateways
s@DescribeVpnGateways' {} Maybe [Filter]
a -> DescribeVpnGateways
s {$sel:filters:DescribeVpnGateways' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeVpnGateways) 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

-- | One or more virtual private gateway IDs.
--
-- Default: Describes all your virtual private gateways.
describeVpnGateways_vpnGatewayIds :: Lens.Lens' DescribeVpnGateways (Prelude.Maybe [Prelude.Text])
describeVpnGateways_vpnGatewayIds :: Lens' DescribeVpnGateways (Maybe [Text])
describeVpnGateways_vpnGatewayIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpnGateways' {Maybe [Text]
vpnGatewayIds :: Maybe [Text]
$sel:vpnGatewayIds:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Text]
vpnGatewayIds} -> Maybe [Text]
vpnGatewayIds) (\s :: DescribeVpnGateways
s@DescribeVpnGateways' {} Maybe [Text]
a -> DescribeVpnGateways
s {$sel:vpnGatewayIds:DescribeVpnGateways' :: Maybe [Text]
vpnGatewayIds = Maybe [Text]
a} :: DescribeVpnGateways) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest DescribeVpnGateways where
  type
    AWSResponse DescribeVpnGateways =
      DescribeVpnGatewaysResponse
  request :: (Service -> Service)
-> DescribeVpnGateways -> Request DescribeVpnGateways
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 DescribeVpnGateways
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeVpnGateways)))
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 [VpnGateway] -> Int -> DescribeVpnGatewaysResponse
DescribeVpnGatewaysResponse'
            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
"vpnGatewaySet"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeVpnGateways where
  hashWithSalt :: Int -> DescribeVpnGateways -> Int
hashWithSalt Int
_salt DescribeVpnGateways' {Maybe Bool
Maybe [Text]
Maybe [Filter]
vpnGatewayIds :: Maybe [Text]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:vpnGatewayIds:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Text]
$sel:filters:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Filter]
$sel:dryRun:DescribeVpnGateways' :: DescribeVpnGateways -> 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]
vpnGatewayIds

instance Prelude.NFData DescribeVpnGateways where
  rnf :: DescribeVpnGateways -> ()
rnf DescribeVpnGateways' {Maybe Bool
Maybe [Text]
Maybe [Filter]
vpnGatewayIds :: Maybe [Text]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:vpnGatewayIds:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Text]
$sel:filters:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Filter]
$sel:dryRun:DescribeVpnGateways' :: DescribeVpnGateways -> 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]
vpnGatewayIds

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

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

instance Data.ToQuery DescribeVpnGateways where
  toQuery :: DescribeVpnGateways -> QueryString
toQuery DescribeVpnGateways' {Maybe Bool
Maybe [Text]
Maybe [Filter]
vpnGatewayIds :: Maybe [Text]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:vpnGatewayIds:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Text]
$sel:filters:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe [Filter]
$sel:dryRun:DescribeVpnGateways' :: DescribeVpnGateways -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeVpnGateways" :: 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
"VpnGatewayId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
vpnGatewayIds
          )
      ]

-- | Contains the output of DescribeVpnGateways.
--
-- /See:/ 'newDescribeVpnGatewaysResponse' smart constructor.
data DescribeVpnGatewaysResponse = DescribeVpnGatewaysResponse'
  { -- | Information about one or more virtual private gateways.
    DescribeVpnGatewaysResponse -> Maybe [VpnGateway]
vpnGateways :: Prelude.Maybe [VpnGateway],
    -- | The response's http status code.
    DescribeVpnGatewaysResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeVpnGatewaysResponse -> DescribeVpnGatewaysResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpnGatewaysResponse -> DescribeVpnGatewaysResponse -> Bool
$c/= :: DescribeVpnGatewaysResponse -> DescribeVpnGatewaysResponse -> Bool
== :: DescribeVpnGatewaysResponse -> DescribeVpnGatewaysResponse -> Bool
$c== :: DescribeVpnGatewaysResponse -> DescribeVpnGatewaysResponse -> Bool
Prelude.Eq, ReadPrec [DescribeVpnGatewaysResponse]
ReadPrec DescribeVpnGatewaysResponse
Int -> ReadS DescribeVpnGatewaysResponse
ReadS [DescribeVpnGatewaysResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpnGatewaysResponse]
$creadListPrec :: ReadPrec [DescribeVpnGatewaysResponse]
readPrec :: ReadPrec DescribeVpnGatewaysResponse
$creadPrec :: ReadPrec DescribeVpnGatewaysResponse
readList :: ReadS [DescribeVpnGatewaysResponse]
$creadList :: ReadS [DescribeVpnGatewaysResponse]
readsPrec :: Int -> ReadS DescribeVpnGatewaysResponse
$creadsPrec :: Int -> ReadS DescribeVpnGatewaysResponse
Prelude.Read, Int -> DescribeVpnGatewaysResponse -> ShowS
[DescribeVpnGatewaysResponse] -> ShowS
DescribeVpnGatewaysResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpnGatewaysResponse] -> ShowS
$cshowList :: [DescribeVpnGatewaysResponse] -> ShowS
show :: DescribeVpnGatewaysResponse -> String
$cshow :: DescribeVpnGatewaysResponse -> String
showsPrec :: Int -> DescribeVpnGatewaysResponse -> ShowS
$cshowsPrec :: Int -> DescribeVpnGatewaysResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeVpnGatewaysResponse x -> DescribeVpnGatewaysResponse
forall x.
DescribeVpnGatewaysResponse -> Rep DescribeVpnGatewaysResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVpnGatewaysResponse x -> DescribeVpnGatewaysResponse
$cfrom :: forall x.
DescribeVpnGatewaysResponse -> Rep DescribeVpnGatewaysResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVpnGatewaysResponse' 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:
--
-- 'vpnGateways', 'describeVpnGatewaysResponse_vpnGateways' - Information about one or more virtual private gateways.
--
-- 'httpStatus', 'describeVpnGatewaysResponse_httpStatus' - The response's http status code.
newDescribeVpnGatewaysResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeVpnGatewaysResponse
newDescribeVpnGatewaysResponse :: Int -> DescribeVpnGatewaysResponse
newDescribeVpnGatewaysResponse Int
pHttpStatus_ =
  DescribeVpnGatewaysResponse'
    { $sel:vpnGateways:DescribeVpnGatewaysResponse' :: Maybe [VpnGateway]
vpnGateways =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeVpnGatewaysResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about one or more virtual private gateways.
describeVpnGatewaysResponse_vpnGateways :: Lens.Lens' DescribeVpnGatewaysResponse (Prelude.Maybe [VpnGateway])
describeVpnGatewaysResponse_vpnGateways :: Lens' DescribeVpnGatewaysResponse (Maybe [VpnGateway])
describeVpnGatewaysResponse_vpnGateways = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpnGatewaysResponse' {Maybe [VpnGateway]
vpnGateways :: Maybe [VpnGateway]
$sel:vpnGateways:DescribeVpnGatewaysResponse' :: DescribeVpnGatewaysResponse -> Maybe [VpnGateway]
vpnGateways} -> Maybe [VpnGateway]
vpnGateways) (\s :: DescribeVpnGatewaysResponse
s@DescribeVpnGatewaysResponse' {} Maybe [VpnGateway]
a -> DescribeVpnGatewaysResponse
s {$sel:vpnGateways:DescribeVpnGatewaysResponse' :: Maybe [VpnGateway]
vpnGateways = Maybe [VpnGateway]
a} :: DescribeVpnGatewaysResponse) 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 response's http status code.
describeVpnGatewaysResponse_httpStatus :: Lens.Lens' DescribeVpnGatewaysResponse Prelude.Int
describeVpnGatewaysResponse_httpStatus :: Lens' DescribeVpnGatewaysResponse Int
describeVpnGatewaysResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpnGatewaysResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeVpnGatewaysResponse' :: DescribeVpnGatewaysResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeVpnGatewaysResponse
s@DescribeVpnGatewaysResponse' {} Int
a -> DescribeVpnGatewaysResponse
s {$sel:httpStatus:DescribeVpnGatewaysResponse' :: Int
httpStatus = Int
a} :: DescribeVpnGatewaysResponse)

instance Prelude.NFData DescribeVpnGatewaysResponse where
  rnf :: DescribeVpnGatewaysResponse -> ()
rnf DescribeVpnGatewaysResponse' {Int
Maybe [VpnGateway]
httpStatus :: Int
vpnGateways :: Maybe [VpnGateway]
$sel:httpStatus:DescribeVpnGatewaysResponse' :: DescribeVpnGatewaysResponse -> Int
$sel:vpnGateways:DescribeVpnGatewaysResponse' :: DescribeVpnGatewaysResponse -> Maybe [VpnGateway]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [VpnGateway]
vpnGateways
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus