{-# 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.DescribeCustomerGateways
-- 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 VPN customer 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.DescribeCustomerGateways
  ( -- * Creating a Request
    DescribeCustomerGateways (..),
    newDescribeCustomerGateways,

    -- * Request Lenses
    describeCustomerGateways_customerGatewayIds,
    describeCustomerGateways_dryRun,
    describeCustomerGateways_filters,

    -- * Destructuring the Response
    DescribeCustomerGatewaysResponse (..),
    newDescribeCustomerGatewaysResponse,

    -- * Response Lenses
    describeCustomerGatewaysResponse_customerGateways,
    describeCustomerGatewaysResponse_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 DescribeCustomerGateways.
--
-- /See:/ 'newDescribeCustomerGateways' smart constructor.
data DescribeCustomerGateways = DescribeCustomerGateways'
  { -- | One or more customer gateway IDs.
    --
    -- Default: Describes all your customer gateways.
    DescribeCustomerGateways -> Maybe [Text]
customerGatewayIds :: Prelude.Maybe [Prelude.Text],
    -- | 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@.
    DescribeCustomerGateways -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters.
    --
    -- -   @bgp-asn@ - The customer gateway\'s Border Gateway Protocol (BGP)
    --     Autonomous System Number (ASN).
    --
    -- -   @customer-gateway-id@ - The ID of the customer gateway.
    --
    -- -   @ip-address@ - The IP address of the customer gateway device\'s
    --     external interface.
    --
    -- -   @state@ - The state of the customer gateway (@pending@ | @available@
    --     | @deleting@ | @deleted@).
    --
    -- -   @type@ - The type of customer gateway. Currently, the only supported
    --     type is @ipsec.1@.
    --
    -- -   @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.
    DescribeCustomerGateways -> Maybe [Filter]
filters :: Prelude.Maybe [Filter]
  }
  deriving (DescribeCustomerGateways -> DescribeCustomerGateways -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCustomerGateways -> DescribeCustomerGateways -> Bool
$c/= :: DescribeCustomerGateways -> DescribeCustomerGateways -> Bool
== :: DescribeCustomerGateways -> DescribeCustomerGateways -> Bool
$c== :: DescribeCustomerGateways -> DescribeCustomerGateways -> Bool
Prelude.Eq, ReadPrec [DescribeCustomerGateways]
ReadPrec DescribeCustomerGateways
Int -> ReadS DescribeCustomerGateways
ReadS [DescribeCustomerGateways]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCustomerGateways]
$creadListPrec :: ReadPrec [DescribeCustomerGateways]
readPrec :: ReadPrec DescribeCustomerGateways
$creadPrec :: ReadPrec DescribeCustomerGateways
readList :: ReadS [DescribeCustomerGateways]
$creadList :: ReadS [DescribeCustomerGateways]
readsPrec :: Int -> ReadS DescribeCustomerGateways
$creadsPrec :: Int -> ReadS DescribeCustomerGateways
Prelude.Read, Int -> DescribeCustomerGateways -> ShowS
[DescribeCustomerGateways] -> ShowS
DescribeCustomerGateways -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCustomerGateways] -> ShowS
$cshowList :: [DescribeCustomerGateways] -> ShowS
show :: DescribeCustomerGateways -> String
$cshow :: DescribeCustomerGateways -> String
showsPrec :: Int -> DescribeCustomerGateways -> ShowS
$cshowsPrec :: Int -> DescribeCustomerGateways -> ShowS
Prelude.Show, forall x.
Rep DescribeCustomerGateways x -> DescribeCustomerGateways
forall x.
DescribeCustomerGateways -> Rep DescribeCustomerGateways x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCustomerGateways x -> DescribeCustomerGateways
$cfrom :: forall x.
DescribeCustomerGateways -> Rep DescribeCustomerGateways x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCustomerGateways' 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:
--
-- 'customerGatewayIds', 'describeCustomerGateways_customerGatewayIds' - One or more customer gateway IDs.
--
-- Default: Describes all your customer gateways.
--
-- 'dryRun', 'describeCustomerGateways_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', 'describeCustomerGateways_filters' - One or more filters.
--
-- -   @bgp-asn@ - The customer gateway\'s Border Gateway Protocol (BGP)
--     Autonomous System Number (ASN).
--
-- -   @customer-gateway-id@ - The ID of the customer gateway.
--
-- -   @ip-address@ - The IP address of the customer gateway device\'s
--     external interface.
--
-- -   @state@ - The state of the customer gateway (@pending@ | @available@
--     | @deleting@ | @deleted@).
--
-- -   @type@ - The type of customer gateway. Currently, the only supported
--     type is @ipsec.1@.
--
-- -   @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.
newDescribeCustomerGateways ::
  DescribeCustomerGateways
newDescribeCustomerGateways :: DescribeCustomerGateways
newDescribeCustomerGateways =
  DescribeCustomerGateways'
    { $sel:customerGatewayIds:DescribeCustomerGateways' :: Maybe [Text]
customerGatewayIds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:DescribeCustomerGateways' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeCustomerGateways' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing
    }

-- | One or more customer gateway IDs.
--
-- Default: Describes all your customer gateways.
describeCustomerGateways_customerGatewayIds :: Lens.Lens' DescribeCustomerGateways (Prelude.Maybe [Prelude.Text])
describeCustomerGateways_customerGatewayIds :: Lens' DescribeCustomerGateways (Maybe [Text])
describeCustomerGateways_customerGatewayIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomerGateways' {Maybe [Text]
customerGatewayIds :: Maybe [Text]
$sel:customerGatewayIds:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe [Text]
customerGatewayIds} -> Maybe [Text]
customerGatewayIds) (\s :: DescribeCustomerGateways
s@DescribeCustomerGateways' {} Maybe [Text]
a -> DescribeCustomerGateways
s {$sel:customerGatewayIds:DescribeCustomerGateways' :: Maybe [Text]
customerGatewayIds = Maybe [Text]
a} :: DescribeCustomerGateways) 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

-- | 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@.
describeCustomerGateways_dryRun :: Lens.Lens' DescribeCustomerGateways (Prelude.Maybe Prelude.Bool)
describeCustomerGateways_dryRun :: Lens' DescribeCustomerGateways (Maybe Bool)
describeCustomerGateways_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomerGateways' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeCustomerGateways
s@DescribeCustomerGateways' {} Maybe Bool
a -> DescribeCustomerGateways
s {$sel:dryRun:DescribeCustomerGateways' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeCustomerGateways)

-- | One or more filters.
--
-- -   @bgp-asn@ - The customer gateway\'s Border Gateway Protocol (BGP)
--     Autonomous System Number (ASN).
--
-- -   @customer-gateway-id@ - The ID of the customer gateway.
--
-- -   @ip-address@ - The IP address of the customer gateway device\'s
--     external interface.
--
-- -   @state@ - The state of the customer gateway (@pending@ | @available@
--     | @deleting@ | @deleted@).
--
-- -   @type@ - The type of customer gateway. Currently, the only supported
--     type is @ipsec.1@.
--
-- -   @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.
describeCustomerGateways_filters :: Lens.Lens' DescribeCustomerGateways (Prelude.Maybe [Filter])
describeCustomerGateways_filters :: Lens' DescribeCustomerGateways (Maybe [Filter])
describeCustomerGateways_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomerGateways' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeCustomerGateways
s@DescribeCustomerGateways' {} Maybe [Filter]
a -> DescribeCustomerGateways
s {$sel:filters:DescribeCustomerGateways' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeCustomerGateways) 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 DescribeCustomerGateways where
  type
    AWSResponse DescribeCustomerGateways =
      DescribeCustomerGatewaysResponse
  request :: (Service -> Service)
-> DescribeCustomerGateways -> Request DescribeCustomerGateways
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 DescribeCustomerGateways
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCustomerGateways)))
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 [CustomerGateway] -> Int -> DescribeCustomerGatewaysResponse
DescribeCustomerGatewaysResponse'
            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
"customerGatewaySet"
                            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 DescribeCustomerGateways where
  hashWithSalt :: Int -> DescribeCustomerGateways -> Int
hashWithSalt Int
_salt DescribeCustomerGateways' {Maybe Bool
Maybe [Text]
Maybe [Filter]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
customerGatewayIds :: Maybe [Text]
$sel:filters:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe [Filter]
$sel:dryRun:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe Bool
$sel:customerGatewayIds:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
customerGatewayIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters

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

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

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

instance Data.ToQuery DescribeCustomerGateways where
  toQuery :: DescribeCustomerGateways -> QueryString
toQuery DescribeCustomerGateways' {Maybe Bool
Maybe [Text]
Maybe [Filter]
filters :: Maybe [Filter]
dryRun :: Maybe Bool
customerGatewayIds :: Maybe [Text]
$sel:filters:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe [Filter]
$sel:dryRun:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe Bool
$sel:customerGatewayIds:DescribeCustomerGateways' :: DescribeCustomerGateways -> Maybe [Text]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeCustomerGateways" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"CustomerGatewayId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
customerGatewayIds
          ),
        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)
      ]

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

-- |
-- Create a value of 'DescribeCustomerGatewaysResponse' 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:
--
-- 'customerGateways', 'describeCustomerGatewaysResponse_customerGateways' - Information about one or more customer gateways.
--
-- 'httpStatus', 'describeCustomerGatewaysResponse_httpStatus' - The response's http status code.
newDescribeCustomerGatewaysResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeCustomerGatewaysResponse
newDescribeCustomerGatewaysResponse :: Int -> DescribeCustomerGatewaysResponse
newDescribeCustomerGatewaysResponse Int
pHttpStatus_ =
  DescribeCustomerGatewaysResponse'
    { $sel:customerGateways:DescribeCustomerGatewaysResponse' :: Maybe [CustomerGateway]
customerGateways =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeCustomerGatewaysResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about one or more customer gateways.
describeCustomerGatewaysResponse_customerGateways :: Lens.Lens' DescribeCustomerGatewaysResponse (Prelude.Maybe [CustomerGateway])
describeCustomerGatewaysResponse_customerGateways :: Lens' DescribeCustomerGatewaysResponse (Maybe [CustomerGateway])
describeCustomerGatewaysResponse_customerGateways = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomerGatewaysResponse' {Maybe [CustomerGateway]
customerGateways :: Maybe [CustomerGateway]
$sel:customerGateways:DescribeCustomerGatewaysResponse' :: DescribeCustomerGatewaysResponse -> Maybe [CustomerGateway]
customerGateways} -> Maybe [CustomerGateway]
customerGateways) (\s :: DescribeCustomerGatewaysResponse
s@DescribeCustomerGatewaysResponse' {} Maybe [CustomerGateway]
a -> DescribeCustomerGatewaysResponse
s {$sel:customerGateways:DescribeCustomerGatewaysResponse' :: Maybe [CustomerGateway]
customerGateways = Maybe [CustomerGateway]
a} :: DescribeCustomerGatewaysResponse) 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.
describeCustomerGatewaysResponse_httpStatus :: Lens.Lens' DescribeCustomerGatewaysResponse Prelude.Int
describeCustomerGatewaysResponse_httpStatus :: Lens' DescribeCustomerGatewaysResponse Int
describeCustomerGatewaysResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomerGatewaysResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeCustomerGatewaysResponse' :: DescribeCustomerGatewaysResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeCustomerGatewaysResponse
s@DescribeCustomerGatewaysResponse' {} Int
a -> DescribeCustomerGatewaysResponse
s {$sel:httpStatus:DescribeCustomerGatewaysResponse' :: Int
httpStatus = Int
a} :: DescribeCustomerGatewaysResponse)

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