{-# 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.ElasticSearch.ListVpcEndpointsForDomain
(
ListVpcEndpointsForDomain (..),
newListVpcEndpointsForDomain,
listVpcEndpointsForDomain_nextToken,
listVpcEndpointsForDomain_domainName,
ListVpcEndpointsForDomainResponse (..),
newListVpcEndpointsForDomainResponse,
listVpcEndpointsForDomainResponse_httpStatus,
listVpcEndpointsForDomainResponse_vpcEndpointSummaryList,
listVpcEndpointsForDomainResponse_nextToken,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticSearch.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListVpcEndpointsForDomain = ListVpcEndpointsForDomain'
{
ListVpcEndpointsForDomain -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListVpcEndpointsForDomain -> Text
domainName :: Prelude.Text
}
deriving (ListVpcEndpointsForDomain -> ListVpcEndpointsForDomain -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVpcEndpointsForDomain -> ListVpcEndpointsForDomain -> Bool
$c/= :: ListVpcEndpointsForDomain -> ListVpcEndpointsForDomain -> Bool
== :: ListVpcEndpointsForDomain -> ListVpcEndpointsForDomain -> Bool
$c== :: ListVpcEndpointsForDomain -> ListVpcEndpointsForDomain -> Bool
Prelude.Eq, ReadPrec [ListVpcEndpointsForDomain]
ReadPrec ListVpcEndpointsForDomain
Int -> ReadS ListVpcEndpointsForDomain
ReadS [ListVpcEndpointsForDomain]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVpcEndpointsForDomain]
$creadListPrec :: ReadPrec [ListVpcEndpointsForDomain]
readPrec :: ReadPrec ListVpcEndpointsForDomain
$creadPrec :: ReadPrec ListVpcEndpointsForDomain
readList :: ReadS [ListVpcEndpointsForDomain]
$creadList :: ReadS [ListVpcEndpointsForDomain]
readsPrec :: Int -> ReadS ListVpcEndpointsForDomain
$creadsPrec :: Int -> ReadS ListVpcEndpointsForDomain
Prelude.Read, Int -> ListVpcEndpointsForDomain -> ShowS
[ListVpcEndpointsForDomain] -> ShowS
ListVpcEndpointsForDomain -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVpcEndpointsForDomain] -> ShowS
$cshowList :: [ListVpcEndpointsForDomain] -> ShowS
show :: ListVpcEndpointsForDomain -> String
$cshow :: ListVpcEndpointsForDomain -> String
showsPrec :: Int -> ListVpcEndpointsForDomain -> ShowS
$cshowsPrec :: Int -> ListVpcEndpointsForDomain -> ShowS
Prelude.Show, forall x.
Rep ListVpcEndpointsForDomain x -> ListVpcEndpointsForDomain
forall x.
ListVpcEndpointsForDomain -> Rep ListVpcEndpointsForDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVpcEndpointsForDomain x -> ListVpcEndpointsForDomain
$cfrom :: forall x.
ListVpcEndpointsForDomain -> Rep ListVpcEndpointsForDomain x
Prelude.Generic)
newListVpcEndpointsForDomain ::
Prelude.Text ->
ListVpcEndpointsForDomain
newListVpcEndpointsForDomain :: Text -> ListVpcEndpointsForDomain
newListVpcEndpointsForDomain Text
pDomainName_ =
ListVpcEndpointsForDomain'
{ $sel:nextToken:ListVpcEndpointsForDomain' :: Maybe Text
nextToken =
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:ListVpcEndpointsForDomain' :: Text
domainName = Text
pDomainName_
}
listVpcEndpointsForDomain_nextToken :: Lens.Lens' ListVpcEndpointsForDomain (Prelude.Maybe Prelude.Text)
listVpcEndpointsForDomain_nextToken :: Lens' ListVpcEndpointsForDomain (Maybe Text)
listVpcEndpointsForDomain_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcEndpointsForDomain' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVpcEndpointsForDomain
s@ListVpcEndpointsForDomain' {} Maybe Text
a -> ListVpcEndpointsForDomain
s {$sel:nextToken:ListVpcEndpointsForDomain' :: Maybe Text
nextToken = Maybe Text
a} :: ListVpcEndpointsForDomain)
listVpcEndpointsForDomain_domainName :: Lens.Lens' ListVpcEndpointsForDomain Prelude.Text
listVpcEndpointsForDomain_domainName :: Lens' ListVpcEndpointsForDomain Text
listVpcEndpointsForDomain_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcEndpointsForDomain' {Text
domainName :: Text
$sel:domainName:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Text
domainName} -> Text
domainName) (\s :: ListVpcEndpointsForDomain
s@ListVpcEndpointsForDomain' {} Text
a -> ListVpcEndpointsForDomain
s {$sel:domainName:ListVpcEndpointsForDomain' :: Text
domainName = Text
a} :: ListVpcEndpointsForDomain)
instance Core.AWSRequest ListVpcEndpointsForDomain where
type
AWSResponse ListVpcEndpointsForDomain =
ListVpcEndpointsForDomainResponse
request :: (Service -> Service)
-> ListVpcEndpointsForDomain -> Request ListVpcEndpointsForDomain
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListVpcEndpointsForDomain
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListVpcEndpointsForDomain)))
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 ->
Int
-> [VpcEndpointSummary]
-> Text
-> ListVpcEndpointsForDomainResponse
ListVpcEndpointsForDomainResponse'
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))
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
"VpcEndpointSummaryList"
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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"NextToken")
)
instance Prelude.Hashable ListVpcEndpointsForDomain where
hashWithSalt :: Int -> ListVpcEndpointsForDomain -> Int
hashWithSalt Int
_salt ListVpcEndpointsForDomain' {Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
$sel:domainName:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Text
$sel:nextToken:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
instance Prelude.NFData ListVpcEndpointsForDomain where
rnf :: ListVpcEndpointsForDomain -> ()
rnf ListVpcEndpointsForDomain' {Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
$sel:domainName:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Text
$sel:nextToken:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> 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 Text
domainName
instance Data.ToHeaders ListVpcEndpointsForDomain where
toHeaders :: ListVpcEndpointsForDomain -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ListVpcEndpointsForDomain where
toPath :: ListVpcEndpointsForDomain -> ByteString
toPath ListVpcEndpointsForDomain' {Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
$sel:domainName:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Text
$sel:nextToken:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2015-01-01/es/domain/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
domainName,
ByteString
"/vpcEndpoints"
]
instance Data.ToQuery ListVpcEndpointsForDomain where
toQuery :: ListVpcEndpointsForDomain -> QueryString
toQuery ListVpcEndpointsForDomain' {Maybe Text
Text
domainName :: Text
nextToken :: Maybe Text
$sel:domainName:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Text
$sel:nextToken:ListVpcEndpointsForDomain' :: ListVpcEndpointsForDomain -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken]
data ListVpcEndpointsForDomainResponse = ListVpcEndpointsForDomainResponse'
{
ListVpcEndpointsForDomainResponse -> Int
httpStatus :: Prelude.Int,
ListVpcEndpointsForDomainResponse -> [VpcEndpointSummary]
vpcEndpointSummaryList :: [VpcEndpointSummary],
ListVpcEndpointsForDomainResponse -> Text
nextToken :: Prelude.Text
}
deriving (ListVpcEndpointsForDomainResponse
-> ListVpcEndpointsForDomainResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVpcEndpointsForDomainResponse
-> ListVpcEndpointsForDomainResponse -> Bool
$c/= :: ListVpcEndpointsForDomainResponse
-> ListVpcEndpointsForDomainResponse -> Bool
== :: ListVpcEndpointsForDomainResponse
-> ListVpcEndpointsForDomainResponse -> Bool
$c== :: ListVpcEndpointsForDomainResponse
-> ListVpcEndpointsForDomainResponse -> Bool
Prelude.Eq, ReadPrec [ListVpcEndpointsForDomainResponse]
ReadPrec ListVpcEndpointsForDomainResponse
Int -> ReadS ListVpcEndpointsForDomainResponse
ReadS [ListVpcEndpointsForDomainResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVpcEndpointsForDomainResponse]
$creadListPrec :: ReadPrec [ListVpcEndpointsForDomainResponse]
readPrec :: ReadPrec ListVpcEndpointsForDomainResponse
$creadPrec :: ReadPrec ListVpcEndpointsForDomainResponse
readList :: ReadS [ListVpcEndpointsForDomainResponse]
$creadList :: ReadS [ListVpcEndpointsForDomainResponse]
readsPrec :: Int -> ReadS ListVpcEndpointsForDomainResponse
$creadsPrec :: Int -> ReadS ListVpcEndpointsForDomainResponse
Prelude.Read, Int -> ListVpcEndpointsForDomainResponse -> ShowS
[ListVpcEndpointsForDomainResponse] -> ShowS
ListVpcEndpointsForDomainResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVpcEndpointsForDomainResponse] -> ShowS
$cshowList :: [ListVpcEndpointsForDomainResponse] -> ShowS
show :: ListVpcEndpointsForDomainResponse -> String
$cshow :: ListVpcEndpointsForDomainResponse -> String
showsPrec :: Int -> ListVpcEndpointsForDomainResponse -> ShowS
$cshowsPrec :: Int -> ListVpcEndpointsForDomainResponse -> ShowS
Prelude.Show, forall x.
Rep ListVpcEndpointsForDomainResponse x
-> ListVpcEndpointsForDomainResponse
forall x.
ListVpcEndpointsForDomainResponse
-> Rep ListVpcEndpointsForDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListVpcEndpointsForDomainResponse x
-> ListVpcEndpointsForDomainResponse
$cfrom :: forall x.
ListVpcEndpointsForDomainResponse
-> Rep ListVpcEndpointsForDomainResponse x
Prelude.Generic)
newListVpcEndpointsForDomainResponse ::
Prelude.Int ->
Prelude.Text ->
ListVpcEndpointsForDomainResponse
newListVpcEndpointsForDomainResponse :: Int -> Text -> ListVpcEndpointsForDomainResponse
newListVpcEndpointsForDomainResponse
Int
pHttpStatus_
Text
pNextToken_ =
ListVpcEndpointsForDomainResponse'
{ $sel:httpStatus:ListVpcEndpointsForDomainResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:vpcEndpointSummaryList:ListVpcEndpointsForDomainResponse' :: [VpcEndpointSummary]
vpcEndpointSummaryList = forall a. Monoid a => a
Prelude.mempty,
$sel:nextToken:ListVpcEndpointsForDomainResponse' :: Text
nextToken = Text
pNextToken_
}
listVpcEndpointsForDomainResponse_httpStatus :: Lens.Lens' ListVpcEndpointsForDomainResponse Prelude.Int
listVpcEndpointsForDomainResponse_httpStatus :: Lens' ListVpcEndpointsForDomainResponse Int
listVpcEndpointsForDomainResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcEndpointsForDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListVpcEndpointsForDomainResponse' :: ListVpcEndpointsForDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListVpcEndpointsForDomainResponse
s@ListVpcEndpointsForDomainResponse' {} Int
a -> ListVpcEndpointsForDomainResponse
s {$sel:httpStatus:ListVpcEndpointsForDomainResponse' :: Int
httpStatus = Int
a} :: ListVpcEndpointsForDomainResponse)
listVpcEndpointsForDomainResponse_vpcEndpointSummaryList :: Lens.Lens' ListVpcEndpointsForDomainResponse [VpcEndpointSummary]
listVpcEndpointsForDomainResponse_vpcEndpointSummaryList :: Lens' ListVpcEndpointsForDomainResponse [VpcEndpointSummary]
listVpcEndpointsForDomainResponse_vpcEndpointSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcEndpointsForDomainResponse' {[VpcEndpointSummary]
vpcEndpointSummaryList :: [VpcEndpointSummary]
$sel:vpcEndpointSummaryList:ListVpcEndpointsForDomainResponse' :: ListVpcEndpointsForDomainResponse -> [VpcEndpointSummary]
vpcEndpointSummaryList} -> [VpcEndpointSummary]
vpcEndpointSummaryList) (\s :: ListVpcEndpointsForDomainResponse
s@ListVpcEndpointsForDomainResponse' {} [VpcEndpointSummary]
a -> ListVpcEndpointsForDomainResponse
s {$sel:vpcEndpointSummaryList:ListVpcEndpointsForDomainResponse' :: [VpcEndpointSummary]
vpcEndpointSummaryList = [VpcEndpointSummary]
a} :: ListVpcEndpointsForDomainResponse) 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
listVpcEndpointsForDomainResponse_nextToken :: Lens.Lens' ListVpcEndpointsForDomainResponse Prelude.Text
listVpcEndpointsForDomainResponse_nextToken :: Lens' ListVpcEndpointsForDomainResponse Text
listVpcEndpointsForDomainResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVpcEndpointsForDomainResponse' {Text
nextToken :: Text
$sel:nextToken:ListVpcEndpointsForDomainResponse' :: ListVpcEndpointsForDomainResponse -> Text
nextToken} -> Text
nextToken) (\s :: ListVpcEndpointsForDomainResponse
s@ListVpcEndpointsForDomainResponse' {} Text
a -> ListVpcEndpointsForDomainResponse
s {$sel:nextToken:ListVpcEndpointsForDomainResponse' :: Text
nextToken = Text
a} :: ListVpcEndpointsForDomainResponse)
instance
Prelude.NFData
ListVpcEndpointsForDomainResponse
where
rnf :: ListVpcEndpointsForDomainResponse -> ()
rnf ListVpcEndpointsForDomainResponse' {Int
[VpcEndpointSummary]
Text
nextToken :: Text
vpcEndpointSummaryList :: [VpcEndpointSummary]
httpStatus :: Int
$sel:nextToken:ListVpcEndpointsForDomainResponse' :: ListVpcEndpointsForDomainResponse -> Text
$sel:vpcEndpointSummaryList:ListVpcEndpointsForDomainResponse' :: ListVpcEndpointsForDomainResponse -> [VpcEndpointSummary]
$sel:httpStatus:ListVpcEndpointsForDomainResponse' :: ListVpcEndpointsForDomainResponse -> Int
..} =
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 [VpcEndpointSummary]
vpcEndpointSummaryList
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
nextToken