{-# 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.GameLift.CreateVpcPeeringConnection
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Establishes a VPC peering connection between a virtual private cloud
-- (VPC) in an AWS account with the VPC for your Amazon GameLift fleet. VPC
-- peering enables the game servers on your fleet to communicate directly
-- with other AWS resources. You can peer with VPCs in any AWS account that
-- you have access to, including the account that you use to manage your
-- Amazon GameLift fleets. You cannot peer with VPCs that are in different
-- Regions. For more information, see
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html VPC Peering with Amazon GameLift Fleets>.
--
-- Before calling this operation to establish the peering connection, you
-- first need to call CreateVpcPeeringAuthorization and identify the VPC
-- you want to peer with. Once the authorization for the specified VPC is
-- issued, you have 24 hours to establish the connection. These two
-- operations handle all tasks necessary to peer the two VPCs, including
-- acceptance, updating routing tables, etc.
--
-- To establish the connection, call this operation from the AWS account
-- that is used to manage the Amazon GameLift fleets. Identify the
-- following values: (1) The ID of the fleet you want to be enable a VPC
-- peering connection for; (2) The AWS account with the VPC that you want
-- to peer with; and (3) The ID of the VPC you want to peer with. This
-- operation is asynchronous. If successful, a VpcPeeringConnection request
-- is created. You can use continuous polling to track the request\'s
-- status using DescribeVpcPeeringConnections, or by monitoring fleet
-- events for success or failure using DescribeFleetEvents.
--
-- __Related actions__
--
-- CreateVpcPeeringAuthorization | DescribeVpcPeeringAuthorizations |
-- DeleteVpcPeeringAuthorization | CreateVpcPeeringConnection |
-- DescribeVpcPeeringConnections | DeleteVpcPeeringConnection |
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets All APIs by task>
module Amazonka.GameLift.CreateVpcPeeringConnection
  ( -- * Creating a Request
    CreateVpcPeeringConnection (..),
    newCreateVpcPeeringConnection,

    -- * Request Lenses
    createVpcPeeringConnection_fleetId,
    createVpcPeeringConnection_peerVpcAwsAccountId,
    createVpcPeeringConnection_peerVpcId,

    -- * Destructuring the Response
    CreateVpcPeeringConnectionResponse (..),
    newCreateVpcPeeringConnectionResponse,

    -- * Response Lenses
    createVpcPeeringConnectionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GameLift.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input for a request operation.
--
-- /See:/ 'newCreateVpcPeeringConnection' smart constructor.
data CreateVpcPeeringConnection = CreateVpcPeeringConnection'
  { -- | A unique identifier for the fleet. You can use either the fleet ID or
    -- ARN value. This tells Amazon GameLift which GameLift VPC to peer with.
    CreateVpcPeeringConnection -> Text
fleetId :: Prelude.Text,
    -- | A unique identifier for the AWS account with the VPC that you want to
    -- peer your Amazon GameLift fleet with. You can find your Account ID in
    -- the AWS Management Console under account settings.
    CreateVpcPeeringConnection -> Text
peerVpcAwsAccountId :: Prelude.Text,
    -- | A unique identifier for a VPC with resources to be accessed by your
    -- GameLift fleet. The VPC must be in the same Region as your fleet. To
    -- look up a VPC ID, use the
    -- <https://console.aws.amazon.com/vpc/ VPC Dashboard> in the AWS
    -- Management Console. Learn more about VPC peering in
    -- <https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html VPC Peering with GameLift Fleets>.
    CreateVpcPeeringConnection -> Text
peerVpcId :: Prelude.Text
  }
  deriving (CreateVpcPeeringConnection -> CreateVpcPeeringConnection -> Bool
(CreateVpcPeeringConnection -> CreateVpcPeeringConnection -> Bool)
-> (CreateVpcPeeringConnection
    -> CreateVpcPeeringConnection -> Bool)
-> Eq CreateVpcPeeringConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpcPeeringConnection -> CreateVpcPeeringConnection -> Bool
$c/= :: CreateVpcPeeringConnection -> CreateVpcPeeringConnection -> Bool
== :: CreateVpcPeeringConnection -> CreateVpcPeeringConnection -> Bool
$c== :: CreateVpcPeeringConnection -> CreateVpcPeeringConnection -> Bool
Prelude.Eq, ReadPrec [CreateVpcPeeringConnection]
ReadPrec CreateVpcPeeringConnection
Int -> ReadS CreateVpcPeeringConnection
ReadS [CreateVpcPeeringConnection]
(Int -> ReadS CreateVpcPeeringConnection)
-> ReadS [CreateVpcPeeringConnection]
-> ReadPrec CreateVpcPeeringConnection
-> ReadPrec [CreateVpcPeeringConnection]
-> Read CreateVpcPeeringConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpcPeeringConnection]
$creadListPrec :: ReadPrec [CreateVpcPeeringConnection]
readPrec :: ReadPrec CreateVpcPeeringConnection
$creadPrec :: ReadPrec CreateVpcPeeringConnection
readList :: ReadS [CreateVpcPeeringConnection]
$creadList :: ReadS [CreateVpcPeeringConnection]
readsPrec :: Int -> ReadS CreateVpcPeeringConnection
$creadsPrec :: Int -> ReadS CreateVpcPeeringConnection
Prelude.Read, Int -> CreateVpcPeeringConnection -> ShowS
[CreateVpcPeeringConnection] -> ShowS
CreateVpcPeeringConnection -> String
(Int -> CreateVpcPeeringConnection -> ShowS)
-> (CreateVpcPeeringConnection -> String)
-> ([CreateVpcPeeringConnection] -> ShowS)
-> Show CreateVpcPeeringConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpcPeeringConnection] -> ShowS
$cshowList :: [CreateVpcPeeringConnection] -> ShowS
show :: CreateVpcPeeringConnection -> String
$cshow :: CreateVpcPeeringConnection -> String
showsPrec :: Int -> CreateVpcPeeringConnection -> ShowS
$cshowsPrec :: Int -> CreateVpcPeeringConnection -> ShowS
Prelude.Show, (forall x.
 CreateVpcPeeringConnection -> Rep CreateVpcPeeringConnection x)
-> (forall x.
    Rep CreateVpcPeeringConnection x -> CreateVpcPeeringConnection)
-> Generic CreateVpcPeeringConnection
forall x.
Rep CreateVpcPeeringConnection x -> CreateVpcPeeringConnection
forall x.
CreateVpcPeeringConnection -> Rep CreateVpcPeeringConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVpcPeeringConnection x -> CreateVpcPeeringConnection
$cfrom :: forall x.
CreateVpcPeeringConnection -> Rep CreateVpcPeeringConnection x
Prelude.Generic)

-- |
-- Create a value of 'CreateVpcPeeringConnection' 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:
--
-- 'fleetId', 'createVpcPeeringConnection_fleetId' - A unique identifier for the fleet. You can use either the fleet ID or
-- ARN value. This tells Amazon GameLift which GameLift VPC to peer with.
--
-- 'peerVpcAwsAccountId', 'createVpcPeeringConnection_peerVpcAwsAccountId' - A unique identifier for the AWS account with the VPC that you want to
-- peer your Amazon GameLift fleet with. You can find your Account ID in
-- the AWS Management Console under account settings.
--
-- 'peerVpcId', 'createVpcPeeringConnection_peerVpcId' - A unique identifier for a VPC with resources to be accessed by your
-- GameLift fleet. The VPC must be in the same Region as your fleet. To
-- look up a VPC ID, use the
-- <https://console.aws.amazon.com/vpc/ VPC Dashboard> in the AWS
-- Management Console. Learn more about VPC peering in
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html VPC Peering with GameLift Fleets>.
newCreateVpcPeeringConnection ::
  -- | 'fleetId'
  Prelude.Text ->
  -- | 'peerVpcAwsAccountId'
  Prelude.Text ->
  -- | 'peerVpcId'
  Prelude.Text ->
  CreateVpcPeeringConnection
newCreateVpcPeeringConnection :: Text -> Text -> Text -> CreateVpcPeeringConnection
newCreateVpcPeeringConnection
  Text
pFleetId_
  Text
pPeerVpcAwsAccountId_
  Text
pPeerVpcId_ =
    CreateVpcPeeringConnection' :: Text -> Text -> Text -> CreateVpcPeeringConnection
CreateVpcPeeringConnection'
      { $sel:fleetId:CreateVpcPeeringConnection' :: Text
fleetId = Text
pFleetId_,
        $sel:peerVpcAwsAccountId:CreateVpcPeeringConnection' :: Text
peerVpcAwsAccountId = Text
pPeerVpcAwsAccountId_,
        $sel:peerVpcId:CreateVpcPeeringConnection' :: Text
peerVpcId = Text
pPeerVpcId_
      }

-- | A unique identifier for the fleet. You can use either the fleet ID or
-- ARN value. This tells Amazon GameLift which GameLift VPC to peer with.
createVpcPeeringConnection_fleetId :: Lens.Lens' CreateVpcPeeringConnection Prelude.Text
createVpcPeeringConnection_fleetId :: (Text -> f Text)
-> CreateVpcPeeringConnection -> f CreateVpcPeeringConnection
createVpcPeeringConnection_fleetId = (CreateVpcPeeringConnection -> Text)
-> (CreateVpcPeeringConnection
    -> Text -> CreateVpcPeeringConnection)
-> Lens
     CreateVpcPeeringConnection CreateVpcPeeringConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcPeeringConnection' {Text
fleetId :: Text
$sel:fleetId:CreateVpcPeeringConnection' :: CreateVpcPeeringConnection -> Text
fleetId} -> Text
fleetId) (\s :: CreateVpcPeeringConnection
s@CreateVpcPeeringConnection' {} Text
a -> CreateVpcPeeringConnection
s {$sel:fleetId:CreateVpcPeeringConnection' :: Text
fleetId = Text
a} :: CreateVpcPeeringConnection)

-- | A unique identifier for the AWS account with the VPC that you want to
-- peer your Amazon GameLift fleet with. You can find your Account ID in
-- the AWS Management Console under account settings.
createVpcPeeringConnection_peerVpcAwsAccountId :: Lens.Lens' CreateVpcPeeringConnection Prelude.Text
createVpcPeeringConnection_peerVpcAwsAccountId :: (Text -> f Text)
-> CreateVpcPeeringConnection -> f CreateVpcPeeringConnection
createVpcPeeringConnection_peerVpcAwsAccountId = (CreateVpcPeeringConnection -> Text)
-> (CreateVpcPeeringConnection
    -> Text -> CreateVpcPeeringConnection)
-> Lens
     CreateVpcPeeringConnection CreateVpcPeeringConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcPeeringConnection' {Text
peerVpcAwsAccountId :: Text
$sel:peerVpcAwsAccountId:CreateVpcPeeringConnection' :: CreateVpcPeeringConnection -> Text
peerVpcAwsAccountId} -> Text
peerVpcAwsAccountId) (\s :: CreateVpcPeeringConnection
s@CreateVpcPeeringConnection' {} Text
a -> CreateVpcPeeringConnection
s {$sel:peerVpcAwsAccountId:CreateVpcPeeringConnection' :: Text
peerVpcAwsAccountId = Text
a} :: CreateVpcPeeringConnection)

-- | A unique identifier for a VPC with resources to be accessed by your
-- GameLift fleet. The VPC must be in the same Region as your fleet. To
-- look up a VPC ID, use the
-- <https://console.aws.amazon.com/vpc/ VPC Dashboard> in the AWS
-- Management Console. Learn more about VPC peering in
-- <https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html VPC Peering with GameLift Fleets>.
createVpcPeeringConnection_peerVpcId :: Lens.Lens' CreateVpcPeeringConnection Prelude.Text
createVpcPeeringConnection_peerVpcId :: (Text -> f Text)
-> CreateVpcPeeringConnection -> f CreateVpcPeeringConnection
createVpcPeeringConnection_peerVpcId = (CreateVpcPeeringConnection -> Text)
-> (CreateVpcPeeringConnection
    -> Text -> CreateVpcPeeringConnection)
-> Lens
     CreateVpcPeeringConnection CreateVpcPeeringConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcPeeringConnection' {Text
peerVpcId :: Text
$sel:peerVpcId:CreateVpcPeeringConnection' :: CreateVpcPeeringConnection -> Text
peerVpcId} -> Text
peerVpcId) (\s :: CreateVpcPeeringConnection
s@CreateVpcPeeringConnection' {} Text
a -> CreateVpcPeeringConnection
s {$sel:peerVpcId:CreateVpcPeeringConnection' :: Text
peerVpcId = Text
a} :: CreateVpcPeeringConnection)

instance Core.AWSRequest CreateVpcPeeringConnection where
  type
    AWSResponse CreateVpcPeeringConnection =
      CreateVpcPeeringConnectionResponse
  request :: CreateVpcPeeringConnection -> Request CreateVpcPeeringConnection
request = Service
-> CreateVpcPeeringConnection -> Request CreateVpcPeeringConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateVpcPeeringConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVpcPeeringConnection)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse CreateVpcPeeringConnection))
-> Logger
-> Service
-> Proxy CreateVpcPeeringConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateVpcPeeringConnection)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> CreateVpcPeeringConnectionResponse
CreateVpcPeeringConnectionResponse'
            (Int -> CreateVpcPeeringConnectionResponse)
-> Either String Int
-> Either String CreateVpcPeeringConnectionResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateVpcPeeringConnection

instance Prelude.NFData CreateVpcPeeringConnection

instance Core.ToHeaders CreateVpcPeeringConnection where
  toHeaders :: CreateVpcPeeringConnection -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateVpcPeeringConnection -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"GameLift.CreateVpcPeeringConnection" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateVpcPeeringConnection where
  toJSON :: CreateVpcPeeringConnection -> Value
toJSON CreateVpcPeeringConnection' {Text
peerVpcId :: Text
peerVpcAwsAccountId :: Text
fleetId :: Text
$sel:peerVpcId:CreateVpcPeeringConnection' :: CreateVpcPeeringConnection -> Text
$sel:peerVpcAwsAccountId:CreateVpcPeeringConnection' :: CreateVpcPeeringConnection -> Text
$sel:fleetId:CreateVpcPeeringConnection' :: CreateVpcPeeringConnection -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"PeerVpcAwsAccountId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
peerVpcAwsAccountId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PeerVpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
peerVpcId)
          ]
      )

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

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

-- | /See:/ 'newCreateVpcPeeringConnectionResponse' smart constructor.
data CreateVpcPeeringConnectionResponse = CreateVpcPeeringConnectionResponse'
  { -- | The response's http status code.
    CreateVpcPeeringConnectionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateVpcPeeringConnectionResponse
-> CreateVpcPeeringConnectionResponse -> Bool
(CreateVpcPeeringConnectionResponse
 -> CreateVpcPeeringConnectionResponse -> Bool)
-> (CreateVpcPeeringConnectionResponse
    -> CreateVpcPeeringConnectionResponse -> Bool)
-> Eq CreateVpcPeeringConnectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpcPeeringConnectionResponse
-> CreateVpcPeeringConnectionResponse -> Bool
$c/= :: CreateVpcPeeringConnectionResponse
-> CreateVpcPeeringConnectionResponse -> Bool
== :: CreateVpcPeeringConnectionResponse
-> CreateVpcPeeringConnectionResponse -> Bool
$c== :: CreateVpcPeeringConnectionResponse
-> CreateVpcPeeringConnectionResponse -> Bool
Prelude.Eq, ReadPrec [CreateVpcPeeringConnectionResponse]
ReadPrec CreateVpcPeeringConnectionResponse
Int -> ReadS CreateVpcPeeringConnectionResponse
ReadS [CreateVpcPeeringConnectionResponse]
(Int -> ReadS CreateVpcPeeringConnectionResponse)
-> ReadS [CreateVpcPeeringConnectionResponse]
-> ReadPrec CreateVpcPeeringConnectionResponse
-> ReadPrec [CreateVpcPeeringConnectionResponse]
-> Read CreateVpcPeeringConnectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpcPeeringConnectionResponse]
$creadListPrec :: ReadPrec [CreateVpcPeeringConnectionResponse]
readPrec :: ReadPrec CreateVpcPeeringConnectionResponse
$creadPrec :: ReadPrec CreateVpcPeeringConnectionResponse
readList :: ReadS [CreateVpcPeeringConnectionResponse]
$creadList :: ReadS [CreateVpcPeeringConnectionResponse]
readsPrec :: Int -> ReadS CreateVpcPeeringConnectionResponse
$creadsPrec :: Int -> ReadS CreateVpcPeeringConnectionResponse
Prelude.Read, Int -> CreateVpcPeeringConnectionResponse -> ShowS
[CreateVpcPeeringConnectionResponse] -> ShowS
CreateVpcPeeringConnectionResponse -> String
(Int -> CreateVpcPeeringConnectionResponse -> ShowS)
-> (CreateVpcPeeringConnectionResponse -> String)
-> ([CreateVpcPeeringConnectionResponse] -> ShowS)
-> Show CreateVpcPeeringConnectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpcPeeringConnectionResponse] -> ShowS
$cshowList :: [CreateVpcPeeringConnectionResponse] -> ShowS
show :: CreateVpcPeeringConnectionResponse -> String
$cshow :: CreateVpcPeeringConnectionResponse -> String
showsPrec :: Int -> CreateVpcPeeringConnectionResponse -> ShowS
$cshowsPrec :: Int -> CreateVpcPeeringConnectionResponse -> ShowS
Prelude.Show, (forall x.
 CreateVpcPeeringConnectionResponse
 -> Rep CreateVpcPeeringConnectionResponse x)
-> (forall x.
    Rep CreateVpcPeeringConnectionResponse x
    -> CreateVpcPeeringConnectionResponse)
-> Generic CreateVpcPeeringConnectionResponse
forall x.
Rep CreateVpcPeeringConnectionResponse x
-> CreateVpcPeeringConnectionResponse
forall x.
CreateVpcPeeringConnectionResponse
-> Rep CreateVpcPeeringConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVpcPeeringConnectionResponse x
-> CreateVpcPeeringConnectionResponse
$cfrom :: forall x.
CreateVpcPeeringConnectionResponse
-> Rep CreateVpcPeeringConnectionResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateVpcPeeringConnectionResponse' 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:
--
-- 'httpStatus', 'createVpcPeeringConnectionResponse_httpStatus' - The response's http status code.
newCreateVpcPeeringConnectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateVpcPeeringConnectionResponse
newCreateVpcPeeringConnectionResponse :: Int -> CreateVpcPeeringConnectionResponse
newCreateVpcPeeringConnectionResponse Int
pHttpStatus_ =
  CreateVpcPeeringConnectionResponse' :: Int -> CreateVpcPeeringConnectionResponse
CreateVpcPeeringConnectionResponse'
    { $sel:httpStatus:CreateVpcPeeringConnectionResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    CreateVpcPeeringConnectionResponse