{-# 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 #-}
module Amazonka.GameLift.DeleteVpcPeeringAuthorization
(
DeleteVpcPeeringAuthorization (..),
newDeleteVpcPeeringAuthorization,
deleteVpcPeeringAuthorization_gameLiftAwsAccountId,
deleteVpcPeeringAuthorization_peerVpcId,
DeleteVpcPeeringAuthorizationResponse (..),
newDeleteVpcPeeringAuthorizationResponse,
deleteVpcPeeringAuthorizationResponse_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
data DeleteVpcPeeringAuthorization = DeleteVpcPeeringAuthorization'
{
DeleteVpcPeeringAuthorization -> Text
gameLiftAwsAccountId :: Prelude.Text,
DeleteVpcPeeringAuthorization -> Text
peerVpcId :: Prelude.Text
}
deriving (DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool
(DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool)
-> (DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool)
-> Eq DeleteVpcPeeringAuthorization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool
$c/= :: DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool
== :: DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool
$c== :: DeleteVpcPeeringAuthorization
-> DeleteVpcPeeringAuthorization -> Bool
Prelude.Eq, ReadPrec [DeleteVpcPeeringAuthorization]
ReadPrec DeleteVpcPeeringAuthorization
Int -> ReadS DeleteVpcPeeringAuthorization
ReadS [DeleteVpcPeeringAuthorization]
(Int -> ReadS DeleteVpcPeeringAuthorization)
-> ReadS [DeleteVpcPeeringAuthorization]
-> ReadPrec DeleteVpcPeeringAuthorization
-> ReadPrec [DeleteVpcPeeringAuthorization]
-> Read DeleteVpcPeeringAuthorization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcPeeringAuthorization]
$creadListPrec :: ReadPrec [DeleteVpcPeeringAuthorization]
readPrec :: ReadPrec DeleteVpcPeeringAuthorization
$creadPrec :: ReadPrec DeleteVpcPeeringAuthorization
readList :: ReadS [DeleteVpcPeeringAuthorization]
$creadList :: ReadS [DeleteVpcPeeringAuthorization]
readsPrec :: Int -> ReadS DeleteVpcPeeringAuthorization
$creadsPrec :: Int -> ReadS DeleteVpcPeeringAuthorization
Prelude.Read, Int -> DeleteVpcPeeringAuthorization -> ShowS
[DeleteVpcPeeringAuthorization] -> ShowS
DeleteVpcPeeringAuthorization -> String
(Int -> DeleteVpcPeeringAuthorization -> ShowS)
-> (DeleteVpcPeeringAuthorization -> String)
-> ([DeleteVpcPeeringAuthorization] -> ShowS)
-> Show DeleteVpcPeeringAuthorization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcPeeringAuthorization] -> ShowS
$cshowList :: [DeleteVpcPeeringAuthorization] -> ShowS
show :: DeleteVpcPeeringAuthorization -> String
$cshow :: DeleteVpcPeeringAuthorization -> String
showsPrec :: Int -> DeleteVpcPeeringAuthorization -> ShowS
$cshowsPrec :: Int -> DeleteVpcPeeringAuthorization -> ShowS
Prelude.Show, (forall x.
DeleteVpcPeeringAuthorization
-> Rep DeleteVpcPeeringAuthorization x)
-> (forall x.
Rep DeleteVpcPeeringAuthorization x
-> DeleteVpcPeeringAuthorization)
-> Generic DeleteVpcPeeringAuthorization
forall x.
Rep DeleteVpcPeeringAuthorization x
-> DeleteVpcPeeringAuthorization
forall x.
DeleteVpcPeeringAuthorization
-> Rep DeleteVpcPeeringAuthorization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcPeeringAuthorization x
-> DeleteVpcPeeringAuthorization
$cfrom :: forall x.
DeleteVpcPeeringAuthorization
-> Rep DeleteVpcPeeringAuthorization x
Prelude.Generic)
newDeleteVpcPeeringAuthorization ::
Prelude.Text ->
Prelude.Text ->
DeleteVpcPeeringAuthorization
newDeleteVpcPeeringAuthorization :: Text -> Text -> DeleteVpcPeeringAuthorization
newDeleteVpcPeeringAuthorization
Text
pGameLiftAwsAccountId_
Text
pPeerVpcId_ =
DeleteVpcPeeringAuthorization' :: Text -> Text -> DeleteVpcPeeringAuthorization
DeleteVpcPeeringAuthorization'
{ $sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: Text
gameLiftAwsAccountId =
Text
pGameLiftAwsAccountId_,
$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: Text
peerVpcId = Text
pPeerVpcId_
}
deleteVpcPeeringAuthorization_gameLiftAwsAccountId :: Lens.Lens' DeleteVpcPeeringAuthorization Prelude.Text
deleteVpcPeeringAuthorization_gameLiftAwsAccountId :: (Text -> f Text)
-> DeleteVpcPeeringAuthorization -> f DeleteVpcPeeringAuthorization
deleteVpcPeeringAuthorization_gameLiftAwsAccountId = (DeleteVpcPeeringAuthorization -> Text)
-> (DeleteVpcPeeringAuthorization
-> Text -> DeleteVpcPeeringAuthorization)
-> Lens
DeleteVpcPeeringAuthorization
DeleteVpcPeeringAuthorization
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcPeeringAuthorization' {Text
gameLiftAwsAccountId :: Text
$sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
gameLiftAwsAccountId} -> Text
gameLiftAwsAccountId) (\s :: DeleteVpcPeeringAuthorization
s@DeleteVpcPeeringAuthorization' {} Text
a -> DeleteVpcPeeringAuthorization
s {$sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: Text
gameLiftAwsAccountId = Text
a} :: DeleteVpcPeeringAuthorization)
deleteVpcPeeringAuthorization_peerVpcId :: Lens.Lens' DeleteVpcPeeringAuthorization Prelude.Text
deleteVpcPeeringAuthorization_peerVpcId :: (Text -> f Text)
-> DeleteVpcPeeringAuthorization -> f DeleteVpcPeeringAuthorization
deleteVpcPeeringAuthorization_peerVpcId = (DeleteVpcPeeringAuthorization -> Text)
-> (DeleteVpcPeeringAuthorization
-> Text -> DeleteVpcPeeringAuthorization)
-> Lens
DeleteVpcPeeringAuthorization
DeleteVpcPeeringAuthorization
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcPeeringAuthorization' {Text
peerVpcId :: Text
$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
peerVpcId} -> Text
peerVpcId) (\s :: DeleteVpcPeeringAuthorization
s@DeleteVpcPeeringAuthorization' {} Text
a -> DeleteVpcPeeringAuthorization
s {$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: Text
peerVpcId = Text
a} :: DeleteVpcPeeringAuthorization)
instance
Core.AWSRequest
DeleteVpcPeeringAuthorization
where
type
AWSResponse DeleteVpcPeeringAuthorization =
DeleteVpcPeeringAuthorizationResponse
request :: DeleteVpcPeeringAuthorization
-> Request DeleteVpcPeeringAuthorization
request = Service
-> DeleteVpcPeeringAuthorization
-> Request DeleteVpcPeeringAuthorization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteVpcPeeringAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVpcPeeringAuthorization)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteVpcPeeringAuthorization))
-> Logger
-> Service
-> Proxy DeleteVpcPeeringAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVpcPeeringAuthorization)))
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 -> DeleteVpcPeeringAuthorizationResponse
DeleteVpcPeeringAuthorizationResponse'
(Int -> DeleteVpcPeeringAuthorizationResponse)
-> Either String Int
-> Either String DeleteVpcPeeringAuthorizationResponse
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
DeleteVpcPeeringAuthorization
instance Prelude.NFData DeleteVpcPeeringAuthorization
instance Core.ToHeaders DeleteVpcPeeringAuthorization where
toHeaders :: DeleteVpcPeeringAuthorization -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteVpcPeeringAuthorization -> 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.DeleteVpcPeeringAuthorization" ::
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 DeleteVpcPeeringAuthorization where
toJSON :: DeleteVpcPeeringAuthorization -> Value
toJSON DeleteVpcPeeringAuthorization' {Text
peerVpcId :: Text
gameLiftAwsAccountId :: Text
$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
$sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> 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
"GameLiftAwsAccountId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gameLiftAwsAccountId
),
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 DeleteVpcPeeringAuthorization where
toPath :: DeleteVpcPeeringAuthorization -> ByteString
toPath = ByteString -> DeleteVpcPeeringAuthorization -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteVpcPeeringAuthorization where
toQuery :: DeleteVpcPeeringAuthorization -> QueryString
toQuery = QueryString -> DeleteVpcPeeringAuthorization -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteVpcPeeringAuthorizationResponse = DeleteVpcPeeringAuthorizationResponse'
{
DeleteVpcPeeringAuthorizationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool
(DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool)
-> (DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool)
-> Eq DeleteVpcPeeringAuthorizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool
$c/= :: DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool
== :: DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool
$c== :: DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVpcPeeringAuthorizationResponse]
ReadPrec DeleteVpcPeeringAuthorizationResponse
Int -> ReadS DeleteVpcPeeringAuthorizationResponse
ReadS [DeleteVpcPeeringAuthorizationResponse]
(Int -> ReadS DeleteVpcPeeringAuthorizationResponse)
-> ReadS [DeleteVpcPeeringAuthorizationResponse]
-> ReadPrec DeleteVpcPeeringAuthorizationResponse
-> ReadPrec [DeleteVpcPeeringAuthorizationResponse]
-> Read DeleteVpcPeeringAuthorizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpcPeeringAuthorizationResponse]
$creadListPrec :: ReadPrec [DeleteVpcPeeringAuthorizationResponse]
readPrec :: ReadPrec DeleteVpcPeeringAuthorizationResponse
$creadPrec :: ReadPrec DeleteVpcPeeringAuthorizationResponse
readList :: ReadS [DeleteVpcPeeringAuthorizationResponse]
$creadList :: ReadS [DeleteVpcPeeringAuthorizationResponse]
readsPrec :: Int -> ReadS DeleteVpcPeeringAuthorizationResponse
$creadsPrec :: Int -> ReadS DeleteVpcPeeringAuthorizationResponse
Prelude.Read, Int -> DeleteVpcPeeringAuthorizationResponse -> ShowS
[DeleteVpcPeeringAuthorizationResponse] -> ShowS
DeleteVpcPeeringAuthorizationResponse -> String
(Int -> DeleteVpcPeeringAuthorizationResponse -> ShowS)
-> (DeleteVpcPeeringAuthorizationResponse -> String)
-> ([DeleteVpcPeeringAuthorizationResponse] -> ShowS)
-> Show DeleteVpcPeeringAuthorizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpcPeeringAuthorizationResponse] -> ShowS
$cshowList :: [DeleteVpcPeeringAuthorizationResponse] -> ShowS
show :: DeleteVpcPeeringAuthorizationResponse -> String
$cshow :: DeleteVpcPeeringAuthorizationResponse -> String
showsPrec :: Int -> DeleteVpcPeeringAuthorizationResponse -> ShowS
$cshowsPrec :: Int -> DeleteVpcPeeringAuthorizationResponse -> ShowS
Prelude.Show, (forall x.
DeleteVpcPeeringAuthorizationResponse
-> Rep DeleteVpcPeeringAuthorizationResponse x)
-> (forall x.
Rep DeleteVpcPeeringAuthorizationResponse x
-> DeleteVpcPeeringAuthorizationResponse)
-> Generic DeleteVpcPeeringAuthorizationResponse
forall x.
Rep DeleteVpcPeeringAuthorizationResponse x
-> DeleteVpcPeeringAuthorizationResponse
forall x.
DeleteVpcPeeringAuthorizationResponse
-> Rep DeleteVpcPeeringAuthorizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpcPeeringAuthorizationResponse x
-> DeleteVpcPeeringAuthorizationResponse
$cfrom :: forall x.
DeleteVpcPeeringAuthorizationResponse
-> Rep DeleteVpcPeeringAuthorizationResponse x
Prelude.Generic)
newDeleteVpcPeeringAuthorizationResponse ::
Prelude.Int ->
DeleteVpcPeeringAuthorizationResponse
newDeleteVpcPeeringAuthorizationResponse :: Int -> DeleteVpcPeeringAuthorizationResponse
newDeleteVpcPeeringAuthorizationResponse Int
pHttpStatus_ =
DeleteVpcPeeringAuthorizationResponse' :: Int -> DeleteVpcPeeringAuthorizationResponse
DeleteVpcPeeringAuthorizationResponse'
{ $sel:httpStatus:DeleteVpcPeeringAuthorizationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteVpcPeeringAuthorizationResponse_httpStatus :: Lens.Lens' DeleteVpcPeeringAuthorizationResponse Prelude.Int
deleteVpcPeeringAuthorizationResponse_httpStatus :: (Int -> f Int)
-> DeleteVpcPeeringAuthorizationResponse
-> f DeleteVpcPeeringAuthorizationResponse
deleteVpcPeeringAuthorizationResponse_httpStatus = (DeleteVpcPeeringAuthorizationResponse -> Int)
-> (DeleteVpcPeeringAuthorizationResponse
-> Int -> DeleteVpcPeeringAuthorizationResponse)
-> Lens
DeleteVpcPeeringAuthorizationResponse
DeleteVpcPeeringAuthorizationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpcPeeringAuthorizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteVpcPeeringAuthorizationResponse' :: DeleteVpcPeeringAuthorizationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteVpcPeeringAuthorizationResponse
s@DeleteVpcPeeringAuthorizationResponse' {} Int
a -> DeleteVpcPeeringAuthorizationResponse
s {$sel:httpStatus:DeleteVpcPeeringAuthorizationResponse' :: Int
httpStatus = Int
a} :: DeleteVpcPeeringAuthorizationResponse)
instance
Prelude.NFData
DeleteVpcPeeringAuthorizationResponse