{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types
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
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]
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
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.
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'
{ $sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: Text
gameLiftAwsAccountId =
Text
pGameLiftAwsAccountId_,
$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: Text
peerVpcId = Text
pPeerVpcId_
}
deleteVpcPeeringAuthorization_gameLiftAwsAccountId :: Lens.Lens' DeleteVpcPeeringAuthorization Prelude.Text
deleteVpcPeeringAuthorization_gameLiftAwsAccountId :: Lens' DeleteVpcPeeringAuthorization Text
deleteVpcPeeringAuthorization_gameLiftAwsAccountId = 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 :: Lens' DeleteVpcPeeringAuthorization Text
deleteVpcPeeringAuthorization_peerVpcId = 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 :: (Service -> Service)
-> DeleteVpcPeeringAuthorization
-> Request DeleteVpcPeeringAuthorization
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteVpcPeeringAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVpcPeeringAuthorization)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteVpcPeeringAuthorizationResponse
DeleteVpcPeeringAuthorizationResponse'
forall (f :: * -> *) a b. Functor 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
DeleteVpcPeeringAuthorization
where
hashWithSalt :: Int -> DeleteVpcPeeringAuthorization -> Int
hashWithSalt Int
_salt DeleteVpcPeeringAuthorization' {Text
peerVpcId :: Text
gameLiftAwsAccountId :: Text
$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
$sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
gameLiftAwsAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
peerVpcId
instance Prelude.NFData DeleteVpcPeeringAuthorization where
rnf :: DeleteVpcPeeringAuthorization -> ()
rnf DeleteVpcPeeringAuthorization' {Text
peerVpcId :: Text
gameLiftAwsAccountId :: Text
$sel:peerVpcId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
$sel:gameLiftAwsAccountId:DeleteVpcPeeringAuthorization' :: DeleteVpcPeeringAuthorization -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
gameLiftAwsAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
peerVpcId
instance Data.ToHeaders DeleteVpcPeeringAuthorization where
toHeaders :: DeleteVpcPeeringAuthorization -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"GameLift.DeleteVpcPeeringAuthorization" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"GameLiftAwsAccountId"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
gameLiftAwsAccountId
),
forall a. a -> Maybe a
Prelude.Just (Key
"PeerVpcId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
peerVpcId)
]
)
instance Data.ToPath DeleteVpcPeeringAuthorization where
toPath :: DeleteVpcPeeringAuthorization -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteVpcPeeringAuthorization where
toQuery :: DeleteVpcPeeringAuthorization -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteVpcPeeringAuthorizationResponse = DeleteVpcPeeringAuthorizationResponse'
{
DeleteVpcPeeringAuthorizationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteVpcPeeringAuthorizationResponse
-> DeleteVpcPeeringAuthorizationResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DeleteVpcPeeringAuthorizationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteVpcPeeringAuthorizationResponse_httpStatus :: Lens.Lens' DeleteVpcPeeringAuthorizationResponse Prelude.Int
deleteVpcPeeringAuthorizationResponse_httpStatus :: Lens' DeleteVpcPeeringAuthorizationResponse Int
deleteVpcPeeringAuthorizationResponse_httpStatus = 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
where
rnf :: DeleteVpcPeeringAuthorizationResponse -> ()
rnf DeleteVpcPeeringAuthorizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteVpcPeeringAuthorizationResponse' :: DeleteVpcPeeringAuthorizationResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus