{-# 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.DescribeVpcPeeringAuthorizations
(
DescribeVpcPeeringAuthorizations (..),
newDescribeVpcPeeringAuthorizations,
DescribeVpcPeeringAuthorizationsResponse (..),
newDescribeVpcPeeringAuthorizationsResponse,
describeVpcPeeringAuthorizationsResponse_vpcPeeringAuthorizations,
describeVpcPeeringAuthorizationsResponse_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 DescribeVpcPeeringAuthorizations = DescribeVpcPeeringAuthorizations'
{
}
deriving (DescribeVpcPeeringAuthorizations
-> DescribeVpcPeeringAuthorizations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpcPeeringAuthorizations
-> DescribeVpcPeeringAuthorizations -> Bool
$c/= :: DescribeVpcPeeringAuthorizations
-> DescribeVpcPeeringAuthorizations -> Bool
== :: DescribeVpcPeeringAuthorizations
-> DescribeVpcPeeringAuthorizations -> Bool
$c== :: DescribeVpcPeeringAuthorizations
-> DescribeVpcPeeringAuthorizations -> Bool
Prelude.Eq, ReadPrec [DescribeVpcPeeringAuthorizations]
ReadPrec DescribeVpcPeeringAuthorizations
Int -> ReadS DescribeVpcPeeringAuthorizations
ReadS [DescribeVpcPeeringAuthorizations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpcPeeringAuthorizations]
$creadListPrec :: ReadPrec [DescribeVpcPeeringAuthorizations]
readPrec :: ReadPrec DescribeVpcPeeringAuthorizations
$creadPrec :: ReadPrec DescribeVpcPeeringAuthorizations
readList :: ReadS [DescribeVpcPeeringAuthorizations]
$creadList :: ReadS [DescribeVpcPeeringAuthorizations]
readsPrec :: Int -> ReadS DescribeVpcPeeringAuthorizations
$creadsPrec :: Int -> ReadS DescribeVpcPeeringAuthorizations
Prelude.Read, Int -> DescribeVpcPeeringAuthorizations -> ShowS
[DescribeVpcPeeringAuthorizations] -> ShowS
DescribeVpcPeeringAuthorizations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpcPeeringAuthorizations] -> ShowS
$cshowList :: [DescribeVpcPeeringAuthorizations] -> ShowS
show :: DescribeVpcPeeringAuthorizations -> String
$cshow :: DescribeVpcPeeringAuthorizations -> String
showsPrec :: Int -> DescribeVpcPeeringAuthorizations -> ShowS
$cshowsPrec :: Int -> DescribeVpcPeeringAuthorizations -> ShowS
Prelude.Show, forall x.
Rep DescribeVpcPeeringAuthorizations x
-> DescribeVpcPeeringAuthorizations
forall x.
DescribeVpcPeeringAuthorizations
-> Rep DescribeVpcPeeringAuthorizations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVpcPeeringAuthorizations x
-> DescribeVpcPeeringAuthorizations
$cfrom :: forall x.
DescribeVpcPeeringAuthorizations
-> Rep DescribeVpcPeeringAuthorizations x
Prelude.Generic)
newDescribeVpcPeeringAuthorizations ::
DescribeVpcPeeringAuthorizations
newDescribeVpcPeeringAuthorizations :: DescribeVpcPeeringAuthorizations
newDescribeVpcPeeringAuthorizations =
DescribeVpcPeeringAuthorizations
DescribeVpcPeeringAuthorizations'
instance
Core.AWSRequest
DescribeVpcPeeringAuthorizations
where
type
AWSResponse DescribeVpcPeeringAuthorizations =
DescribeVpcPeeringAuthorizationsResponse
request :: (Service -> Service)
-> DescribeVpcPeeringAuthorizations
-> Request DescribeVpcPeeringAuthorizations
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 DescribeVpcPeeringAuthorizations
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeVpcPeeringAuthorizations)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [VpcPeeringAuthorization]
-> Int -> DescribeVpcPeeringAuthorizationsResponse
DescribeVpcPeeringAuthorizationsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VpcPeeringAuthorizations"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
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
DescribeVpcPeeringAuthorizations
where
hashWithSalt :: Int -> DescribeVpcPeeringAuthorizations -> Int
hashWithSalt Int
_salt DescribeVpcPeeringAuthorizations
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance
Prelude.NFData
DescribeVpcPeeringAuthorizations
where
rnf :: DescribeVpcPeeringAuthorizations -> ()
rnf DescribeVpcPeeringAuthorizations
_ = ()
instance
Data.ToHeaders
DescribeVpcPeeringAuthorizations
where
toHeaders :: DescribeVpcPeeringAuthorizations -> 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.DescribeVpcPeeringAuthorizations" ::
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 DescribeVpcPeeringAuthorizations where
toJSON :: DescribeVpcPeeringAuthorizations -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath DescribeVpcPeeringAuthorizations where
toPath :: DescribeVpcPeeringAuthorizations -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DescribeVpcPeeringAuthorizations
where
toQuery :: DescribeVpcPeeringAuthorizations -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeVpcPeeringAuthorizationsResponse = DescribeVpcPeeringAuthorizationsResponse'
{
DescribeVpcPeeringAuthorizationsResponse
-> Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations :: Prelude.Maybe [VpcPeeringAuthorization],
DescribeVpcPeeringAuthorizationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeVpcPeeringAuthorizationsResponse
-> DescribeVpcPeeringAuthorizationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpcPeeringAuthorizationsResponse
-> DescribeVpcPeeringAuthorizationsResponse -> Bool
$c/= :: DescribeVpcPeeringAuthorizationsResponse
-> DescribeVpcPeeringAuthorizationsResponse -> Bool
== :: DescribeVpcPeeringAuthorizationsResponse
-> DescribeVpcPeeringAuthorizationsResponse -> Bool
$c== :: DescribeVpcPeeringAuthorizationsResponse
-> DescribeVpcPeeringAuthorizationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeVpcPeeringAuthorizationsResponse]
ReadPrec DescribeVpcPeeringAuthorizationsResponse
Int -> ReadS DescribeVpcPeeringAuthorizationsResponse
ReadS [DescribeVpcPeeringAuthorizationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpcPeeringAuthorizationsResponse]
$creadListPrec :: ReadPrec [DescribeVpcPeeringAuthorizationsResponse]
readPrec :: ReadPrec DescribeVpcPeeringAuthorizationsResponse
$creadPrec :: ReadPrec DescribeVpcPeeringAuthorizationsResponse
readList :: ReadS [DescribeVpcPeeringAuthorizationsResponse]
$creadList :: ReadS [DescribeVpcPeeringAuthorizationsResponse]
readsPrec :: Int -> ReadS DescribeVpcPeeringAuthorizationsResponse
$creadsPrec :: Int -> ReadS DescribeVpcPeeringAuthorizationsResponse
Prelude.Read, Int -> DescribeVpcPeeringAuthorizationsResponse -> ShowS
[DescribeVpcPeeringAuthorizationsResponse] -> ShowS
DescribeVpcPeeringAuthorizationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpcPeeringAuthorizationsResponse] -> ShowS
$cshowList :: [DescribeVpcPeeringAuthorizationsResponse] -> ShowS
show :: DescribeVpcPeeringAuthorizationsResponse -> String
$cshow :: DescribeVpcPeeringAuthorizationsResponse -> String
showsPrec :: Int -> DescribeVpcPeeringAuthorizationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeVpcPeeringAuthorizationsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeVpcPeeringAuthorizationsResponse x
-> DescribeVpcPeeringAuthorizationsResponse
forall x.
DescribeVpcPeeringAuthorizationsResponse
-> Rep DescribeVpcPeeringAuthorizationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVpcPeeringAuthorizationsResponse x
-> DescribeVpcPeeringAuthorizationsResponse
$cfrom :: forall x.
DescribeVpcPeeringAuthorizationsResponse
-> Rep DescribeVpcPeeringAuthorizationsResponse x
Prelude.Generic)
newDescribeVpcPeeringAuthorizationsResponse ::
Prelude.Int ->
DescribeVpcPeeringAuthorizationsResponse
newDescribeVpcPeeringAuthorizationsResponse :: Int -> DescribeVpcPeeringAuthorizationsResponse
newDescribeVpcPeeringAuthorizationsResponse
Int
pHttpStatus_ =
DescribeVpcPeeringAuthorizationsResponse'
{ $sel:vpcPeeringAuthorizations:DescribeVpcPeeringAuthorizationsResponse' :: Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeVpcPeeringAuthorizationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeVpcPeeringAuthorizationsResponse_vpcPeeringAuthorizations :: Lens.Lens' DescribeVpcPeeringAuthorizationsResponse (Prelude.Maybe [VpcPeeringAuthorization])
describeVpcPeeringAuthorizationsResponse_vpcPeeringAuthorizations :: Lens'
DescribeVpcPeeringAuthorizationsResponse
(Maybe [VpcPeeringAuthorization])
describeVpcPeeringAuthorizationsResponse_vpcPeeringAuthorizations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcPeeringAuthorizationsResponse' {Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations :: Maybe [VpcPeeringAuthorization]
$sel:vpcPeeringAuthorizations:DescribeVpcPeeringAuthorizationsResponse' :: DescribeVpcPeeringAuthorizationsResponse
-> Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations} -> Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations) (\s :: DescribeVpcPeeringAuthorizationsResponse
s@DescribeVpcPeeringAuthorizationsResponse' {} Maybe [VpcPeeringAuthorization]
a -> DescribeVpcPeeringAuthorizationsResponse
s {$sel:vpcPeeringAuthorizations:DescribeVpcPeeringAuthorizationsResponse' :: Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations = Maybe [VpcPeeringAuthorization]
a} :: DescribeVpcPeeringAuthorizationsResponse) 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
describeVpcPeeringAuthorizationsResponse_httpStatus :: Lens.Lens' DescribeVpcPeeringAuthorizationsResponse Prelude.Int
describeVpcPeeringAuthorizationsResponse_httpStatus :: Lens' DescribeVpcPeeringAuthorizationsResponse Int
describeVpcPeeringAuthorizationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcPeeringAuthorizationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeVpcPeeringAuthorizationsResponse' :: DescribeVpcPeeringAuthorizationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeVpcPeeringAuthorizationsResponse
s@DescribeVpcPeeringAuthorizationsResponse' {} Int
a -> DescribeVpcPeeringAuthorizationsResponse
s {$sel:httpStatus:DescribeVpcPeeringAuthorizationsResponse' :: Int
httpStatus = Int
a} :: DescribeVpcPeeringAuthorizationsResponse)
instance
Prelude.NFData
DescribeVpcPeeringAuthorizationsResponse
where
rnf :: DescribeVpcPeeringAuthorizationsResponse -> ()
rnf DescribeVpcPeeringAuthorizationsResponse' {Int
Maybe [VpcPeeringAuthorization]
httpStatus :: Int
vpcPeeringAuthorizations :: Maybe [VpcPeeringAuthorization]
$sel:httpStatus:DescribeVpcPeeringAuthorizationsResponse' :: DescribeVpcPeeringAuthorizationsResponse -> Int
$sel:vpcPeeringAuthorizations:DescribeVpcPeeringAuthorizationsResponse' :: DescribeVpcPeeringAuthorizationsResponse
-> Maybe [VpcPeeringAuthorization]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [VpcPeeringAuthorization]
vpcPeeringAuthorizations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus