{-# 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.AppRunner.ListVpcIngressConnections
(
ListVpcIngressConnections (..),
newListVpcIngressConnections,
listVpcIngressConnections_filter,
listVpcIngressConnections_maxResults,
listVpcIngressConnections_nextToken,
ListVpcIngressConnectionsResponse (..),
newListVpcIngressConnectionsResponse,
listVpcIngressConnectionsResponse_nextToken,
listVpcIngressConnectionsResponse_httpStatus,
listVpcIngressConnectionsResponse_vpcIngressConnectionSummaryList,
)
where
import Amazonka.AppRunner.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListVpcIngressConnections = ListVpcIngressConnections'
{
ListVpcIngressConnections -> Maybe ListVpcIngressConnectionsFilter
filter' :: Prelude.Maybe ListVpcIngressConnectionsFilter,
ListVpcIngressConnections -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListVpcIngressConnections -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListVpcIngressConnections -> ListVpcIngressConnections -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVpcIngressConnections -> ListVpcIngressConnections -> Bool
$c/= :: ListVpcIngressConnections -> ListVpcIngressConnections -> Bool
== :: ListVpcIngressConnections -> ListVpcIngressConnections -> Bool
$c== :: ListVpcIngressConnections -> ListVpcIngressConnections -> Bool
Prelude.Eq, ReadPrec [ListVpcIngressConnections]
ReadPrec ListVpcIngressConnections
Int -> ReadS ListVpcIngressConnections
ReadS [ListVpcIngressConnections]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVpcIngressConnections]
$creadListPrec :: ReadPrec [ListVpcIngressConnections]
readPrec :: ReadPrec ListVpcIngressConnections
$creadPrec :: ReadPrec ListVpcIngressConnections
readList :: ReadS [ListVpcIngressConnections]
$creadList :: ReadS [ListVpcIngressConnections]
readsPrec :: Int -> ReadS ListVpcIngressConnections
$creadsPrec :: Int -> ReadS ListVpcIngressConnections
Prelude.Read, Int -> ListVpcIngressConnections -> ShowS
[ListVpcIngressConnections] -> ShowS
ListVpcIngressConnections -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVpcIngressConnections] -> ShowS
$cshowList :: [ListVpcIngressConnections] -> ShowS
show :: ListVpcIngressConnections -> String
$cshow :: ListVpcIngressConnections -> String
showsPrec :: Int -> ListVpcIngressConnections -> ShowS
$cshowsPrec :: Int -> ListVpcIngressConnections -> ShowS
Prelude.Show, forall x.
Rep ListVpcIngressConnections x -> ListVpcIngressConnections
forall x.
ListVpcIngressConnections -> Rep ListVpcIngressConnections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVpcIngressConnections x -> ListVpcIngressConnections
$cfrom :: forall x.
ListVpcIngressConnections -> Rep ListVpcIngressConnections x
Prelude.Generic)
newListVpcIngressConnections ::
ListVpcIngressConnections
newListVpcIngressConnections :: ListVpcIngressConnections
newListVpcIngressConnections =
ListVpcIngressConnections'
{ $sel:filter':ListVpcIngressConnections' :: Maybe ListVpcIngressConnectionsFilter
filter' =
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListVpcIngressConnections' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListVpcIngressConnections' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listVpcIngressConnections_filter :: Lens.Lens' ListVpcIngressConnections (Prelude.Maybe ListVpcIngressConnectionsFilter)
listVpcIngressConnections_filter :: Lens'
ListVpcIngressConnections (Maybe ListVpcIngressConnectionsFilter)
listVpcIngressConnections_filter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcIngressConnections' {Maybe ListVpcIngressConnectionsFilter
filter' :: Maybe ListVpcIngressConnectionsFilter
$sel:filter':ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe ListVpcIngressConnectionsFilter
filter'} -> Maybe ListVpcIngressConnectionsFilter
filter') (\s :: ListVpcIngressConnections
s@ListVpcIngressConnections' {} Maybe ListVpcIngressConnectionsFilter
a -> ListVpcIngressConnections
s {$sel:filter':ListVpcIngressConnections' :: Maybe ListVpcIngressConnectionsFilter
filter' = Maybe ListVpcIngressConnectionsFilter
a} :: ListVpcIngressConnections)
listVpcIngressConnections_maxResults :: Lens.Lens' ListVpcIngressConnections (Prelude.Maybe Prelude.Natural)
listVpcIngressConnections_maxResults :: Lens' ListVpcIngressConnections (Maybe Natural)
listVpcIngressConnections_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcIngressConnections' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListVpcIngressConnections
s@ListVpcIngressConnections' {} Maybe Natural
a -> ListVpcIngressConnections
s {$sel:maxResults:ListVpcIngressConnections' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListVpcIngressConnections)
listVpcIngressConnections_nextToken :: Lens.Lens' ListVpcIngressConnections (Prelude.Maybe Prelude.Text)
listVpcIngressConnections_nextToken :: Lens' ListVpcIngressConnections (Maybe Text)
listVpcIngressConnections_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcIngressConnections' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVpcIngressConnections
s@ListVpcIngressConnections' {} Maybe Text
a -> ListVpcIngressConnections
s {$sel:nextToken:ListVpcIngressConnections' :: Maybe Text
nextToken = Maybe Text
a} :: ListVpcIngressConnections)
instance Core.AWSRequest ListVpcIngressConnections where
type
AWSResponse ListVpcIngressConnections =
ListVpcIngressConnectionsResponse
request :: (Service -> Service)
-> ListVpcIngressConnections -> Request ListVpcIngressConnections
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 ListVpcIngressConnections
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListVpcIngressConnections)))
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 Text
-> Int
-> [VpcIngressConnectionSummary]
-> ListVpcIngressConnectionsResponse
ListVpcIngressConnectionsResponse'
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
"NextToken")
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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"VpcIngressConnectionSummaryList"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ListVpcIngressConnections where
hashWithSalt :: Int -> ListVpcIngressConnections -> Int
hashWithSalt Int
_salt ListVpcIngressConnections' {Maybe Natural
Maybe Text
Maybe ListVpcIngressConnectionsFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe ListVpcIngressConnectionsFilter
$sel:nextToken:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Text
$sel:maxResults:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Natural
$sel:filter':ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe ListVpcIngressConnectionsFilter
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ListVpcIngressConnectionsFilter
filter'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance Prelude.NFData ListVpcIngressConnections where
rnf :: ListVpcIngressConnections -> ()
rnf ListVpcIngressConnections' {Maybe Natural
Maybe Text
Maybe ListVpcIngressConnectionsFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe ListVpcIngressConnectionsFilter
$sel:nextToken:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Text
$sel:maxResults:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Natural
$sel:filter':ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe ListVpcIngressConnectionsFilter
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ListVpcIngressConnectionsFilter
filter'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
instance Data.ToHeaders ListVpcIngressConnections where
toHeaders :: ListVpcIngressConnections -> 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
"AppRunner.ListVpcIngressConnections" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON ListVpcIngressConnections where
toJSON :: ListVpcIngressConnections -> Value
toJSON ListVpcIngressConnections' {Maybe Natural
Maybe Text
Maybe ListVpcIngressConnectionsFilter
nextToken :: Maybe Text
maxResults :: Maybe Natural
filter' :: Maybe ListVpcIngressConnectionsFilter
$sel:nextToken:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Text
$sel:maxResults:ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe Natural
$sel:filter':ListVpcIngressConnections' :: ListVpcIngressConnections -> Maybe ListVpcIngressConnectionsFilter
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Filter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ListVpcIngressConnectionsFilter
filter',
(Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
]
)
instance Data.ToPath ListVpcIngressConnections where
toPath :: ListVpcIngressConnections -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListVpcIngressConnections where
toQuery :: ListVpcIngressConnections -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListVpcIngressConnectionsResponse = ListVpcIngressConnectionsResponse'
{
ListVpcIngressConnectionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListVpcIngressConnectionsResponse -> Int
httpStatus :: Prelude.Int,
ListVpcIngressConnectionsResponse -> [VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList :: [VpcIngressConnectionSummary]
}
deriving (ListVpcIngressConnectionsResponse
-> ListVpcIngressConnectionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVpcIngressConnectionsResponse
-> ListVpcIngressConnectionsResponse -> Bool
$c/= :: ListVpcIngressConnectionsResponse
-> ListVpcIngressConnectionsResponse -> Bool
== :: ListVpcIngressConnectionsResponse
-> ListVpcIngressConnectionsResponse -> Bool
$c== :: ListVpcIngressConnectionsResponse
-> ListVpcIngressConnectionsResponse -> Bool
Prelude.Eq, ReadPrec [ListVpcIngressConnectionsResponse]
ReadPrec ListVpcIngressConnectionsResponse
Int -> ReadS ListVpcIngressConnectionsResponse
ReadS [ListVpcIngressConnectionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVpcIngressConnectionsResponse]
$creadListPrec :: ReadPrec [ListVpcIngressConnectionsResponse]
readPrec :: ReadPrec ListVpcIngressConnectionsResponse
$creadPrec :: ReadPrec ListVpcIngressConnectionsResponse
readList :: ReadS [ListVpcIngressConnectionsResponse]
$creadList :: ReadS [ListVpcIngressConnectionsResponse]
readsPrec :: Int -> ReadS ListVpcIngressConnectionsResponse
$creadsPrec :: Int -> ReadS ListVpcIngressConnectionsResponse
Prelude.Read, Int -> ListVpcIngressConnectionsResponse -> ShowS
[ListVpcIngressConnectionsResponse] -> ShowS
ListVpcIngressConnectionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVpcIngressConnectionsResponse] -> ShowS
$cshowList :: [ListVpcIngressConnectionsResponse] -> ShowS
show :: ListVpcIngressConnectionsResponse -> String
$cshow :: ListVpcIngressConnectionsResponse -> String
showsPrec :: Int -> ListVpcIngressConnectionsResponse -> ShowS
$cshowsPrec :: Int -> ListVpcIngressConnectionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListVpcIngressConnectionsResponse x
-> ListVpcIngressConnectionsResponse
forall x.
ListVpcIngressConnectionsResponse
-> Rep ListVpcIngressConnectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVpcIngressConnectionsResponse x
-> ListVpcIngressConnectionsResponse
$cfrom :: forall x.
ListVpcIngressConnectionsResponse
-> Rep ListVpcIngressConnectionsResponse x
Prelude.Generic)
newListVpcIngressConnectionsResponse ::
Prelude.Int ->
ListVpcIngressConnectionsResponse
newListVpcIngressConnectionsResponse :: Int -> ListVpcIngressConnectionsResponse
newListVpcIngressConnectionsResponse Int
pHttpStatus_ =
ListVpcIngressConnectionsResponse'
{ $sel:nextToken:ListVpcIngressConnectionsResponse' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListVpcIngressConnectionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:vpcIngressConnectionSummaryList:ListVpcIngressConnectionsResponse' :: [VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList =
forall a. Monoid a => a
Prelude.mempty
}
listVpcIngressConnectionsResponse_nextToken :: Lens.Lens' ListVpcIngressConnectionsResponse (Prelude.Maybe Prelude.Text)
listVpcIngressConnectionsResponse_nextToken :: Lens' ListVpcIngressConnectionsResponse (Maybe Text)
listVpcIngressConnectionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcIngressConnectionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVpcIngressConnectionsResponse' :: ListVpcIngressConnectionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVpcIngressConnectionsResponse
s@ListVpcIngressConnectionsResponse' {} Maybe Text
a -> ListVpcIngressConnectionsResponse
s {$sel:nextToken:ListVpcIngressConnectionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListVpcIngressConnectionsResponse)
listVpcIngressConnectionsResponse_httpStatus :: Lens.Lens' ListVpcIngressConnectionsResponse Prelude.Int
listVpcIngressConnectionsResponse_httpStatus :: Lens' ListVpcIngressConnectionsResponse Int
listVpcIngressConnectionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcIngressConnectionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListVpcIngressConnectionsResponse' :: ListVpcIngressConnectionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListVpcIngressConnectionsResponse
s@ListVpcIngressConnectionsResponse' {} Int
a -> ListVpcIngressConnectionsResponse
s {$sel:httpStatus:ListVpcIngressConnectionsResponse' :: Int
httpStatus = Int
a} :: ListVpcIngressConnectionsResponse)
listVpcIngressConnectionsResponse_vpcIngressConnectionSummaryList :: Lens.Lens' ListVpcIngressConnectionsResponse [VpcIngressConnectionSummary]
listVpcIngressConnectionsResponse_vpcIngressConnectionSummaryList :: Lens'
ListVpcIngressConnectionsResponse [VpcIngressConnectionSummary]
listVpcIngressConnectionsResponse_vpcIngressConnectionSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcIngressConnectionsResponse' {[VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList :: [VpcIngressConnectionSummary]
$sel:vpcIngressConnectionSummaryList:ListVpcIngressConnectionsResponse' :: ListVpcIngressConnectionsResponse -> [VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList} -> [VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList) (\s :: ListVpcIngressConnectionsResponse
s@ListVpcIngressConnectionsResponse' {} [VpcIngressConnectionSummary]
a -> ListVpcIngressConnectionsResponse
s {$sel:vpcIngressConnectionSummaryList:ListVpcIngressConnectionsResponse' :: [VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList = [VpcIngressConnectionSummary]
a} :: ListVpcIngressConnectionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
ListVpcIngressConnectionsResponse
where
rnf :: ListVpcIngressConnectionsResponse -> ()
rnf ListVpcIngressConnectionsResponse' {Int
[VpcIngressConnectionSummary]
Maybe Text
vpcIngressConnectionSummaryList :: [VpcIngressConnectionSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:vpcIngressConnectionSummaryList:ListVpcIngressConnectionsResponse' :: ListVpcIngressConnectionsResponse -> [VpcIngressConnectionSummary]
$sel:httpStatus:ListVpcIngressConnectionsResponse' :: ListVpcIngressConnectionsResponse -> Int
$sel:nextToken:ListVpcIngressConnectionsResponse' :: ListVpcIngressConnectionsResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [VpcIngressConnectionSummary]
vpcIngressConnectionSummaryList