{-# 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.CreateVpnGateway
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a virtual private gateway. A virtual private gateway is the
-- endpoint on the VPC side of your VPN connection. You can create a
-- virtual private gateway before creating the VPC itself.
--
-- 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.CreateVpnGateway
  ( -- * Creating a Request
    CreateVpnGateway (..),
    newCreateVpnGateway,

    -- * Request Lenses
    createVpnGateway_amazonSideAsn,
    createVpnGateway_availabilityZone,
    createVpnGateway_dryRun,
    createVpnGateway_tagSpecifications,
    createVpnGateway_type,

    -- * Destructuring the Response
    CreateVpnGatewayResponse (..),
    newCreateVpnGatewayResponse,

    -- * Response Lenses
    createVpnGatewayResponse_vpnGateway,
    createVpnGatewayResponse_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 CreateVpnGateway.
--
-- /See:/ 'newCreateVpnGateway' smart constructor.
data CreateVpnGateway = CreateVpnGateway'
  { -- | A private Autonomous System Number (ASN) for the Amazon side of a BGP
    -- session. If you\'re using a 16-bit ASN, it must be in the 64512 to 65534
    -- range. If you\'re using a 32-bit ASN, it must be in the 4200000000 to
    -- 4294967294 range.
    --
    -- Default: 64512
    CreateVpnGateway -> Maybe Integer
amazonSideAsn :: Prelude.Maybe Prelude.Integer,
    -- | The Availability Zone for the virtual private gateway.
    CreateVpnGateway -> Maybe Text
availabilityZone :: 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@.
    CreateVpnGateway -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The tags to apply to the virtual private gateway.
    CreateVpnGateway -> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
    -- | The type of VPN connection this virtual private gateway supports.
    CreateVpnGateway -> GatewayType
type' :: GatewayType
  }
  deriving (CreateVpnGateway -> CreateVpnGateway -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpnGateway -> CreateVpnGateway -> Bool
$c/= :: CreateVpnGateway -> CreateVpnGateway -> Bool
== :: CreateVpnGateway -> CreateVpnGateway -> Bool
$c== :: CreateVpnGateway -> CreateVpnGateway -> Bool
Prelude.Eq, ReadPrec [CreateVpnGateway]
ReadPrec CreateVpnGateway
Int -> ReadS CreateVpnGateway
ReadS [CreateVpnGateway]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpnGateway]
$creadListPrec :: ReadPrec [CreateVpnGateway]
readPrec :: ReadPrec CreateVpnGateway
$creadPrec :: ReadPrec CreateVpnGateway
readList :: ReadS [CreateVpnGateway]
$creadList :: ReadS [CreateVpnGateway]
readsPrec :: Int -> ReadS CreateVpnGateway
$creadsPrec :: Int -> ReadS CreateVpnGateway
Prelude.Read, Int -> CreateVpnGateway -> ShowS
[CreateVpnGateway] -> ShowS
CreateVpnGateway -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpnGateway] -> ShowS
$cshowList :: [CreateVpnGateway] -> ShowS
show :: CreateVpnGateway -> String
$cshow :: CreateVpnGateway -> String
showsPrec :: Int -> CreateVpnGateway -> ShowS
$cshowsPrec :: Int -> CreateVpnGateway -> ShowS
Prelude.Show, forall x. Rep CreateVpnGateway x -> CreateVpnGateway
forall x. CreateVpnGateway -> Rep CreateVpnGateway x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateVpnGateway x -> CreateVpnGateway
$cfrom :: forall x. CreateVpnGateway -> Rep CreateVpnGateway x
Prelude.Generic)

-- |
-- Create a value of 'CreateVpnGateway' 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:
--
-- 'amazonSideAsn', 'createVpnGateway_amazonSideAsn' - A private Autonomous System Number (ASN) for the Amazon side of a BGP
-- session. If you\'re using a 16-bit ASN, it must be in the 64512 to 65534
-- range. If you\'re using a 32-bit ASN, it must be in the 4200000000 to
-- 4294967294 range.
--
-- Default: 64512
--
-- 'availabilityZone', 'createVpnGateway_availabilityZone' - The Availability Zone for the virtual private gateway.
--
-- 'dryRun', 'createVpnGateway_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@.
--
-- 'tagSpecifications', 'createVpnGateway_tagSpecifications' - The tags to apply to the virtual private gateway.
--
-- 'type'', 'createVpnGateway_type' - The type of VPN connection this virtual private gateway supports.
newCreateVpnGateway ::
  -- | 'type''
  GatewayType ->
  CreateVpnGateway
newCreateVpnGateway :: GatewayType -> CreateVpnGateway
newCreateVpnGateway GatewayType
pType_ =
  CreateVpnGateway'
    { $sel:amazonSideAsn:CreateVpnGateway' :: Maybe Integer
amazonSideAsn = forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:CreateVpnGateway' :: Maybe Text
availabilityZone = forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:CreateVpnGateway' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:tagSpecifications:CreateVpnGateway' :: Maybe [TagSpecification]
tagSpecifications = forall a. Maybe a
Prelude.Nothing,
      $sel:type':CreateVpnGateway' :: GatewayType
type' = GatewayType
pType_
    }

-- | A private Autonomous System Number (ASN) for the Amazon side of a BGP
-- session. If you\'re using a 16-bit ASN, it must be in the 64512 to 65534
-- range. If you\'re using a 32-bit ASN, it must be in the 4200000000 to
-- 4294967294 range.
--
-- Default: 64512
createVpnGateway_amazonSideAsn :: Lens.Lens' CreateVpnGateway (Prelude.Maybe Prelude.Integer)
createVpnGateway_amazonSideAsn :: Lens' CreateVpnGateway (Maybe Integer)
createVpnGateway_amazonSideAsn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnGateway' {Maybe Integer
amazonSideAsn :: Maybe Integer
$sel:amazonSideAsn:CreateVpnGateway' :: CreateVpnGateway -> Maybe Integer
amazonSideAsn} -> Maybe Integer
amazonSideAsn) (\s :: CreateVpnGateway
s@CreateVpnGateway' {} Maybe Integer
a -> CreateVpnGateway
s {$sel:amazonSideAsn:CreateVpnGateway' :: Maybe Integer
amazonSideAsn = Maybe Integer
a} :: CreateVpnGateway)

-- | The Availability Zone for the virtual private gateway.
createVpnGateway_availabilityZone :: Lens.Lens' CreateVpnGateway (Prelude.Maybe Prelude.Text)
createVpnGateway_availabilityZone :: Lens' CreateVpnGateway (Maybe Text)
createVpnGateway_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnGateway' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:CreateVpnGateway' :: CreateVpnGateway -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: CreateVpnGateway
s@CreateVpnGateway' {} Maybe Text
a -> CreateVpnGateway
s {$sel:availabilityZone:CreateVpnGateway' :: Maybe Text
availabilityZone = Maybe Text
a} :: CreateVpnGateway)

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

-- | The tags to apply to the virtual private gateway.
createVpnGateway_tagSpecifications :: Lens.Lens' CreateVpnGateway (Prelude.Maybe [TagSpecification])
createVpnGateway_tagSpecifications :: Lens' CreateVpnGateway (Maybe [TagSpecification])
createVpnGateway_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnGateway' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:CreateVpnGateway' :: CreateVpnGateway -> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: CreateVpnGateway
s@CreateVpnGateway' {} Maybe [TagSpecification]
a -> CreateVpnGateway
s {$sel:tagSpecifications:CreateVpnGateway' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: CreateVpnGateway) 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 type of VPN connection this virtual private gateway supports.
createVpnGateway_type :: Lens.Lens' CreateVpnGateway GatewayType
createVpnGateway_type :: Lens' CreateVpnGateway GatewayType
createVpnGateway_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnGateway' {GatewayType
type' :: GatewayType
$sel:type':CreateVpnGateway' :: CreateVpnGateway -> GatewayType
type'} -> GatewayType
type') (\s :: CreateVpnGateway
s@CreateVpnGateway' {} GatewayType
a -> CreateVpnGateway
s {$sel:type':CreateVpnGateway' :: GatewayType
type' = GatewayType
a} :: CreateVpnGateway)

instance Core.AWSRequest CreateVpnGateway where
  type
    AWSResponse CreateVpnGateway =
      CreateVpnGatewayResponse
  request :: (Service -> Service)
-> CreateVpnGateway -> Request CreateVpnGateway
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 CreateVpnGateway
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateVpnGateway)))
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 -> CreateVpnGatewayResponse
CreateVpnGatewayResponse'
            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
"vpnGateway")
            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 CreateVpnGateway where
  hashWithSalt :: Int -> CreateVpnGateway -> Int
hashWithSalt Int
_salt CreateVpnGateway' {Maybe Bool
Maybe Integer
Maybe [TagSpecification]
Maybe Text
GatewayType
type' :: GatewayType
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
availabilityZone :: Maybe Text
amazonSideAsn :: Maybe Integer
$sel:type':CreateVpnGateway' :: CreateVpnGateway -> GatewayType
$sel:tagSpecifications:CreateVpnGateway' :: CreateVpnGateway -> Maybe [TagSpecification]
$sel:dryRun:CreateVpnGateway' :: CreateVpnGateway -> Maybe Bool
$sel:availabilityZone:CreateVpnGateway' :: CreateVpnGateway -> Maybe Text
$sel:amazonSideAsn:CreateVpnGateway' :: CreateVpnGateway -> Maybe Integer
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
amazonSideAsn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availabilityZone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagSpecification]
tagSpecifications
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` GatewayType
type'

instance Prelude.NFData CreateVpnGateway where
  rnf :: CreateVpnGateway -> ()
rnf CreateVpnGateway' {Maybe Bool
Maybe Integer
Maybe [TagSpecification]
Maybe Text
GatewayType
type' :: GatewayType
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
availabilityZone :: Maybe Text
amazonSideAsn :: Maybe Integer
$sel:type':CreateVpnGateway' :: CreateVpnGateway -> GatewayType
$sel:tagSpecifications:CreateVpnGateway' :: CreateVpnGateway -> Maybe [TagSpecification]
$sel:dryRun:CreateVpnGateway' :: CreateVpnGateway -> Maybe Bool
$sel:availabilityZone:CreateVpnGateway' :: CreateVpnGateway -> Maybe Text
$sel:amazonSideAsn:CreateVpnGateway' :: CreateVpnGateway -> Maybe Integer
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
amazonSideAsn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availabilityZone
      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 [TagSpecification]
tagSpecifications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf GatewayType
type'

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

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

instance Data.ToQuery CreateVpnGateway where
  toQuery :: CreateVpnGateway -> QueryString
toQuery CreateVpnGateway' {Maybe Bool
Maybe Integer
Maybe [TagSpecification]
Maybe Text
GatewayType
type' :: GatewayType
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
availabilityZone :: Maybe Text
amazonSideAsn :: Maybe Integer
$sel:type':CreateVpnGateway' :: CreateVpnGateway -> GatewayType
$sel:tagSpecifications:CreateVpnGateway' :: CreateVpnGateway -> Maybe [TagSpecification]
$sel:dryRun:CreateVpnGateway' :: CreateVpnGateway -> Maybe Bool
$sel:availabilityZone:CreateVpnGateway' :: CreateVpnGateway -> Maybe Text
$sel:amazonSideAsn:CreateVpnGateway' :: CreateVpnGateway -> Maybe Integer
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateVpnGateway" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"AmazonSideAsn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Integer
amazonSideAsn,
        ByteString
"AvailabilityZone" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
availabilityZone,
        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
"TagSpecification"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
          ),
        ByteString
"Type" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: GatewayType
type'
      ]

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

-- |
-- Create a value of 'CreateVpnGatewayResponse' 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:
--
-- 'vpnGateway', 'createVpnGatewayResponse_vpnGateway' - Information about the virtual private gateway.
--
-- 'httpStatus', 'createVpnGatewayResponse_httpStatus' - The response's http status code.
newCreateVpnGatewayResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateVpnGatewayResponse
newCreateVpnGatewayResponse :: Int -> CreateVpnGatewayResponse
newCreateVpnGatewayResponse Int
pHttpStatus_ =
  CreateVpnGatewayResponse'
    { $sel:vpnGateway:CreateVpnGatewayResponse' :: Maybe VpnGateway
vpnGateway =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateVpnGatewayResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the virtual private gateway.
createVpnGatewayResponse_vpnGateway :: Lens.Lens' CreateVpnGatewayResponse (Prelude.Maybe VpnGateway)
createVpnGatewayResponse_vpnGateway :: Lens' CreateVpnGatewayResponse (Maybe VpnGateway)
createVpnGatewayResponse_vpnGateway = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpnGatewayResponse' {Maybe VpnGateway
vpnGateway :: Maybe VpnGateway
$sel:vpnGateway:CreateVpnGatewayResponse' :: CreateVpnGatewayResponse -> Maybe VpnGateway
vpnGateway} -> Maybe VpnGateway
vpnGateway) (\s :: CreateVpnGatewayResponse
s@CreateVpnGatewayResponse' {} Maybe VpnGateway
a -> CreateVpnGatewayResponse
s {$sel:vpnGateway:CreateVpnGatewayResponse' :: Maybe VpnGateway
vpnGateway = Maybe VpnGateway
a} :: CreateVpnGatewayResponse)

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

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