{-# 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.ModifyVpcPeeringConnectionOptions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- We are retiring EC2-Classic. We recommend that you migrate from
-- EC2-Classic to a VPC. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html Migrate from EC2-Classic to a VPC>
-- in the /Amazon Elastic Compute Cloud User Guide/.
--
-- Modifies the VPC peering connection options on one side of a VPC peering
-- connection. You can do the following:
--
-- -   Enable\/disable communication over the peering connection between an
--     EC2-Classic instance that\'s linked to your VPC (using ClassicLink)
--     and instances in the peer VPC.
--
-- -   Enable\/disable communication over the peering connection between
--     instances in your VPC and an EC2-Classic instance that\'s linked to
--     the peer VPC.
--
-- -   Enable\/disable the ability to resolve public DNS hostnames to
--     private IP addresses when queried from instances in the peer VPC.
--
-- If the peered VPCs are in the same Amazon Web Services account, you can
-- enable DNS resolution for queries from the local VPC. This ensures that
-- queries from the local VPC resolve to private IP addresses in the peer
-- VPC. This option is not available if the peered VPCs are in different
-- different Amazon Web Services accounts or different Regions. For peered
-- VPCs in different Amazon Web Services accounts, each Amazon Web Services
-- account owner must initiate a separate request to modify the peering
-- connection options. For inter-region peering connections, you must use
-- the Region for the requester VPC to modify the requester VPC peering
-- options and the Region for the accepter VPC to modify the accepter VPC
-- peering options. To verify which VPCs are the accepter and the requester
-- for a VPC peering connection, use the DescribeVpcPeeringConnections
-- command.
module Amazonka.EC2.ModifyVpcPeeringConnectionOptions
  ( -- * Creating a Request
    ModifyVpcPeeringConnectionOptions (..),
    newModifyVpcPeeringConnectionOptions,

    -- * Request Lenses
    modifyVpcPeeringConnectionOptions_accepterPeeringConnectionOptions,
    modifyVpcPeeringConnectionOptions_dryRun,
    modifyVpcPeeringConnectionOptions_requesterPeeringConnectionOptions,
    modifyVpcPeeringConnectionOptions_vpcPeeringConnectionId,

    -- * Destructuring the Response
    ModifyVpcPeeringConnectionOptionsResponse (..),
    newModifyVpcPeeringConnectionOptionsResponse,

    -- * Response Lenses
    modifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions,
    modifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions,
    modifyVpcPeeringConnectionOptionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newModifyVpcPeeringConnectionOptions' smart constructor.
data ModifyVpcPeeringConnectionOptions = ModifyVpcPeeringConnectionOptions'
  { -- | The VPC peering connection options for the accepter VPC.
    ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions :: Prelude.Maybe PeeringConnectionOptionsRequest,
    -- | 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@.
    ModifyVpcPeeringConnectionOptions -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The VPC peering connection options for the requester VPC.
    ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions :: Prelude.Maybe PeeringConnectionOptionsRequest,
    -- | The ID of the VPC peering connection.
    ModifyVpcPeeringConnectionOptions -> Text
vpcPeeringConnectionId :: Prelude.Text
  }
  deriving (ModifyVpcPeeringConnectionOptions
-> ModifyVpcPeeringConnectionOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyVpcPeeringConnectionOptions
-> ModifyVpcPeeringConnectionOptions -> Bool
$c/= :: ModifyVpcPeeringConnectionOptions
-> ModifyVpcPeeringConnectionOptions -> Bool
== :: ModifyVpcPeeringConnectionOptions
-> ModifyVpcPeeringConnectionOptions -> Bool
$c== :: ModifyVpcPeeringConnectionOptions
-> ModifyVpcPeeringConnectionOptions -> Bool
Prelude.Eq, ReadPrec [ModifyVpcPeeringConnectionOptions]
ReadPrec ModifyVpcPeeringConnectionOptions
Int -> ReadS ModifyVpcPeeringConnectionOptions
ReadS [ModifyVpcPeeringConnectionOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyVpcPeeringConnectionOptions]
$creadListPrec :: ReadPrec [ModifyVpcPeeringConnectionOptions]
readPrec :: ReadPrec ModifyVpcPeeringConnectionOptions
$creadPrec :: ReadPrec ModifyVpcPeeringConnectionOptions
readList :: ReadS [ModifyVpcPeeringConnectionOptions]
$creadList :: ReadS [ModifyVpcPeeringConnectionOptions]
readsPrec :: Int -> ReadS ModifyVpcPeeringConnectionOptions
$creadsPrec :: Int -> ReadS ModifyVpcPeeringConnectionOptions
Prelude.Read, Int -> ModifyVpcPeeringConnectionOptions -> ShowS
[ModifyVpcPeeringConnectionOptions] -> ShowS
ModifyVpcPeeringConnectionOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyVpcPeeringConnectionOptions] -> ShowS
$cshowList :: [ModifyVpcPeeringConnectionOptions] -> ShowS
show :: ModifyVpcPeeringConnectionOptions -> String
$cshow :: ModifyVpcPeeringConnectionOptions -> String
showsPrec :: Int -> ModifyVpcPeeringConnectionOptions -> ShowS
$cshowsPrec :: Int -> ModifyVpcPeeringConnectionOptions -> ShowS
Prelude.Show, forall x.
Rep ModifyVpcPeeringConnectionOptions x
-> ModifyVpcPeeringConnectionOptions
forall x.
ModifyVpcPeeringConnectionOptions
-> Rep ModifyVpcPeeringConnectionOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyVpcPeeringConnectionOptions x
-> ModifyVpcPeeringConnectionOptions
$cfrom :: forall x.
ModifyVpcPeeringConnectionOptions
-> Rep ModifyVpcPeeringConnectionOptions x
Prelude.Generic)

-- |
-- Create a value of 'ModifyVpcPeeringConnectionOptions' 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:
--
-- 'accepterPeeringConnectionOptions', 'modifyVpcPeeringConnectionOptions_accepterPeeringConnectionOptions' - The VPC peering connection options for the accepter VPC.
--
-- 'dryRun', 'modifyVpcPeeringConnectionOptions_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@.
--
-- 'requesterPeeringConnectionOptions', 'modifyVpcPeeringConnectionOptions_requesterPeeringConnectionOptions' - The VPC peering connection options for the requester VPC.
--
-- 'vpcPeeringConnectionId', 'modifyVpcPeeringConnectionOptions_vpcPeeringConnectionId' - The ID of the VPC peering connection.
newModifyVpcPeeringConnectionOptions ::
  -- | 'vpcPeeringConnectionId'
  Prelude.Text ->
  ModifyVpcPeeringConnectionOptions
newModifyVpcPeeringConnectionOptions :: Text -> ModifyVpcPeeringConnectionOptions
newModifyVpcPeeringConnectionOptions
  Text
pVpcPeeringConnectionId_ =
    ModifyVpcPeeringConnectionOptions'
      { $sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:dryRun:ModifyVpcPeeringConnectionOptions' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
        $sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:vpcPeeringConnectionId:ModifyVpcPeeringConnectionOptions' :: Text
vpcPeeringConnectionId =
          Text
pVpcPeeringConnectionId_
      }

-- | The VPC peering connection options for the accepter VPC.
modifyVpcPeeringConnectionOptions_accepterPeeringConnectionOptions :: Lens.Lens' ModifyVpcPeeringConnectionOptions (Prelude.Maybe PeeringConnectionOptionsRequest)
modifyVpcPeeringConnectionOptions_accepterPeeringConnectionOptions :: Lens'
  ModifyVpcPeeringConnectionOptions
  (Maybe PeeringConnectionOptionsRequest)
modifyVpcPeeringConnectionOptions_accepterPeeringConnectionOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcPeeringConnectionOptions' {Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions} -> Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions) (\s :: ModifyVpcPeeringConnectionOptions
s@ModifyVpcPeeringConnectionOptions' {} Maybe PeeringConnectionOptionsRequest
a -> ModifyVpcPeeringConnectionOptions
s {$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions = Maybe PeeringConnectionOptionsRequest
a} :: ModifyVpcPeeringConnectionOptions)

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

-- | The VPC peering connection options for the requester VPC.
modifyVpcPeeringConnectionOptions_requesterPeeringConnectionOptions :: Lens.Lens' ModifyVpcPeeringConnectionOptions (Prelude.Maybe PeeringConnectionOptionsRequest)
modifyVpcPeeringConnectionOptions_requesterPeeringConnectionOptions :: Lens'
  ModifyVpcPeeringConnectionOptions
  (Maybe PeeringConnectionOptionsRequest)
modifyVpcPeeringConnectionOptions_requesterPeeringConnectionOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcPeeringConnectionOptions' {Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions} -> Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions) (\s :: ModifyVpcPeeringConnectionOptions
s@ModifyVpcPeeringConnectionOptions' {} Maybe PeeringConnectionOptionsRequest
a -> ModifyVpcPeeringConnectionOptions
s {$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions = Maybe PeeringConnectionOptionsRequest
a} :: ModifyVpcPeeringConnectionOptions)

-- | The ID of the VPC peering connection.
modifyVpcPeeringConnectionOptions_vpcPeeringConnectionId :: Lens.Lens' ModifyVpcPeeringConnectionOptions Prelude.Text
modifyVpcPeeringConnectionOptions_vpcPeeringConnectionId :: Lens' ModifyVpcPeeringConnectionOptions Text
modifyVpcPeeringConnectionOptions_vpcPeeringConnectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcPeeringConnectionOptions' {Text
vpcPeeringConnectionId :: Text
$sel:vpcPeeringConnectionId:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Text
vpcPeeringConnectionId} -> Text
vpcPeeringConnectionId) (\s :: ModifyVpcPeeringConnectionOptions
s@ModifyVpcPeeringConnectionOptions' {} Text
a -> ModifyVpcPeeringConnectionOptions
s {$sel:vpcPeeringConnectionId:ModifyVpcPeeringConnectionOptions' :: Text
vpcPeeringConnectionId = Text
a} :: ModifyVpcPeeringConnectionOptions)

instance
  Core.AWSRequest
    ModifyVpcPeeringConnectionOptions
  where
  type
    AWSResponse ModifyVpcPeeringConnectionOptions =
      ModifyVpcPeeringConnectionOptionsResponse
  request :: (Service -> Service)
-> ModifyVpcPeeringConnectionOptions
-> Request ModifyVpcPeeringConnectionOptions
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 ModifyVpcPeeringConnectionOptions
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ModifyVpcPeeringConnectionOptions)))
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 PeeringConnectionOptions
-> Maybe PeeringConnectionOptions
-> Int
-> ModifyVpcPeeringConnectionOptionsResponse
ModifyVpcPeeringConnectionOptionsResponse'
            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
"accepterPeeringConnectionOptions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"requesterPeeringConnectionOptions")
            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
    ModifyVpcPeeringConnectionOptions
  where
  hashWithSalt :: Int -> ModifyVpcPeeringConnectionOptions -> Int
hashWithSalt
    Int
_salt
    ModifyVpcPeeringConnectionOptions' {Maybe Bool
Maybe PeeringConnectionOptionsRequest
Text
vpcPeeringConnectionId :: Text
requesterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
dryRun :: Maybe Bool
accepterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
$sel:vpcPeeringConnectionId:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Text
$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
$sel:dryRun:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Maybe Bool
$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcPeeringConnectionId

instance
  Prelude.NFData
    ModifyVpcPeeringConnectionOptions
  where
  rnf :: ModifyVpcPeeringConnectionOptions -> ()
rnf ModifyVpcPeeringConnectionOptions' {Maybe Bool
Maybe PeeringConnectionOptionsRequest
Text
vpcPeeringConnectionId :: Text
requesterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
dryRun :: Maybe Bool
accepterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
$sel:vpcPeeringConnectionId:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Text
$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
$sel:dryRun:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Maybe Bool
$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions
      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 PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vpcPeeringConnectionId

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

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

instance
  Data.ToQuery
    ModifyVpcPeeringConnectionOptions
  where
  toQuery :: ModifyVpcPeeringConnectionOptions -> QueryString
toQuery ModifyVpcPeeringConnectionOptions' {Maybe Bool
Maybe PeeringConnectionOptionsRequest
Text
vpcPeeringConnectionId :: Text
requesterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
dryRun :: Maybe Bool
accepterPeeringConnectionOptions :: Maybe PeeringConnectionOptionsRequest
$sel:vpcPeeringConnectionId:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Text
$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
$sel:dryRun:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions -> Maybe Bool
$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptions' :: ModifyVpcPeeringConnectionOptions
-> Maybe PeeringConnectionOptionsRequest
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"ModifyVpcPeeringConnectionOptions" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"AccepterPeeringConnectionOptions"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe PeeringConnectionOptionsRequest
accepterPeeringConnectionOptions,
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"RequesterPeeringConnectionOptions"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe PeeringConnectionOptionsRequest
requesterPeeringConnectionOptions,
        ByteString
"VpcPeeringConnectionId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vpcPeeringConnectionId
      ]

-- | /See:/ 'newModifyVpcPeeringConnectionOptionsResponse' smart constructor.
data ModifyVpcPeeringConnectionOptionsResponse = ModifyVpcPeeringConnectionOptionsResponse'
  { -- | Information about the VPC peering connection options for the accepter
    -- VPC.
    ModifyVpcPeeringConnectionOptionsResponse
-> Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions :: Prelude.Maybe PeeringConnectionOptions,
    -- | Information about the VPC peering connection options for the requester
    -- VPC.
    ModifyVpcPeeringConnectionOptionsResponse
-> Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions :: Prelude.Maybe PeeringConnectionOptions,
    -- | The response's http status code.
    ModifyVpcPeeringConnectionOptionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyVpcPeeringConnectionOptionsResponse
-> ModifyVpcPeeringConnectionOptionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyVpcPeeringConnectionOptionsResponse
-> ModifyVpcPeeringConnectionOptionsResponse -> Bool
$c/= :: ModifyVpcPeeringConnectionOptionsResponse
-> ModifyVpcPeeringConnectionOptionsResponse -> Bool
== :: ModifyVpcPeeringConnectionOptionsResponse
-> ModifyVpcPeeringConnectionOptionsResponse -> Bool
$c== :: ModifyVpcPeeringConnectionOptionsResponse
-> ModifyVpcPeeringConnectionOptionsResponse -> Bool
Prelude.Eq, ReadPrec [ModifyVpcPeeringConnectionOptionsResponse]
ReadPrec ModifyVpcPeeringConnectionOptionsResponse
Int -> ReadS ModifyVpcPeeringConnectionOptionsResponse
ReadS [ModifyVpcPeeringConnectionOptionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyVpcPeeringConnectionOptionsResponse]
$creadListPrec :: ReadPrec [ModifyVpcPeeringConnectionOptionsResponse]
readPrec :: ReadPrec ModifyVpcPeeringConnectionOptionsResponse
$creadPrec :: ReadPrec ModifyVpcPeeringConnectionOptionsResponse
readList :: ReadS [ModifyVpcPeeringConnectionOptionsResponse]
$creadList :: ReadS [ModifyVpcPeeringConnectionOptionsResponse]
readsPrec :: Int -> ReadS ModifyVpcPeeringConnectionOptionsResponse
$creadsPrec :: Int -> ReadS ModifyVpcPeeringConnectionOptionsResponse
Prelude.Read, Int -> ModifyVpcPeeringConnectionOptionsResponse -> ShowS
[ModifyVpcPeeringConnectionOptionsResponse] -> ShowS
ModifyVpcPeeringConnectionOptionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyVpcPeeringConnectionOptionsResponse] -> ShowS
$cshowList :: [ModifyVpcPeeringConnectionOptionsResponse] -> ShowS
show :: ModifyVpcPeeringConnectionOptionsResponse -> String
$cshow :: ModifyVpcPeeringConnectionOptionsResponse -> String
showsPrec :: Int -> ModifyVpcPeeringConnectionOptionsResponse -> ShowS
$cshowsPrec :: Int -> ModifyVpcPeeringConnectionOptionsResponse -> ShowS
Prelude.Show, forall x.
Rep ModifyVpcPeeringConnectionOptionsResponse x
-> ModifyVpcPeeringConnectionOptionsResponse
forall x.
ModifyVpcPeeringConnectionOptionsResponse
-> Rep ModifyVpcPeeringConnectionOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyVpcPeeringConnectionOptionsResponse x
-> ModifyVpcPeeringConnectionOptionsResponse
$cfrom :: forall x.
ModifyVpcPeeringConnectionOptionsResponse
-> Rep ModifyVpcPeeringConnectionOptionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyVpcPeeringConnectionOptionsResponse' 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:
--
-- 'accepterPeeringConnectionOptions', 'modifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions' - Information about the VPC peering connection options for the accepter
-- VPC.
--
-- 'requesterPeeringConnectionOptions', 'modifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions' - Information about the VPC peering connection options for the requester
-- VPC.
--
-- 'httpStatus', 'modifyVpcPeeringConnectionOptionsResponse_httpStatus' - The response's http status code.
newModifyVpcPeeringConnectionOptionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyVpcPeeringConnectionOptionsResponse
newModifyVpcPeeringConnectionOptionsResponse :: Int -> ModifyVpcPeeringConnectionOptionsResponse
newModifyVpcPeeringConnectionOptionsResponse
  Int
pHttpStatus_ =
    ModifyVpcPeeringConnectionOptionsResponse'
      { $sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ModifyVpcPeeringConnectionOptionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Information about the VPC peering connection options for the accepter
-- VPC.
modifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions :: Lens.Lens' ModifyVpcPeeringConnectionOptionsResponse (Prelude.Maybe PeeringConnectionOptions)
modifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions :: Lens'
  ModifyVpcPeeringConnectionOptionsResponse
  (Maybe PeeringConnectionOptions)
modifyVpcPeeringConnectionOptionsResponse_accepterPeeringConnectionOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcPeeringConnectionOptionsResponse' {Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions :: Maybe PeeringConnectionOptions
$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: ModifyVpcPeeringConnectionOptionsResponse
-> Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions} -> Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions) (\s :: ModifyVpcPeeringConnectionOptionsResponse
s@ModifyVpcPeeringConnectionOptionsResponse' {} Maybe PeeringConnectionOptions
a -> ModifyVpcPeeringConnectionOptionsResponse
s {$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions = Maybe PeeringConnectionOptions
a} :: ModifyVpcPeeringConnectionOptionsResponse)

-- | Information about the VPC peering connection options for the requester
-- VPC.
modifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions :: Lens.Lens' ModifyVpcPeeringConnectionOptionsResponse (Prelude.Maybe PeeringConnectionOptions)
modifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions :: Lens'
  ModifyVpcPeeringConnectionOptionsResponse
  (Maybe PeeringConnectionOptions)
modifyVpcPeeringConnectionOptionsResponse_requesterPeeringConnectionOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcPeeringConnectionOptionsResponse' {Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions :: Maybe PeeringConnectionOptions
$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: ModifyVpcPeeringConnectionOptionsResponse
-> Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions} -> Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions) (\s :: ModifyVpcPeeringConnectionOptionsResponse
s@ModifyVpcPeeringConnectionOptionsResponse' {} Maybe PeeringConnectionOptions
a -> ModifyVpcPeeringConnectionOptionsResponse
s {$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions = Maybe PeeringConnectionOptions
a} :: ModifyVpcPeeringConnectionOptionsResponse)

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

instance
  Prelude.NFData
    ModifyVpcPeeringConnectionOptionsResponse
  where
  rnf :: ModifyVpcPeeringConnectionOptionsResponse -> ()
rnf ModifyVpcPeeringConnectionOptionsResponse' {Int
Maybe PeeringConnectionOptions
httpStatus :: Int
requesterPeeringConnectionOptions :: Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions :: Maybe PeeringConnectionOptions
$sel:httpStatus:ModifyVpcPeeringConnectionOptionsResponse' :: ModifyVpcPeeringConnectionOptionsResponse -> Int
$sel:requesterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: ModifyVpcPeeringConnectionOptionsResponse
-> Maybe PeeringConnectionOptions
$sel:accepterPeeringConnectionOptions:ModifyVpcPeeringConnectionOptionsResponse' :: ModifyVpcPeeringConnectionOptionsResponse
-> Maybe PeeringConnectionOptions
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe PeeringConnectionOptions
accepterPeeringConnectionOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PeeringConnectionOptions
requesterPeeringConnectionOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus