{-# 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.Glue.ListDevEndpoints
(
ListDevEndpoints (..),
newListDevEndpoints,
listDevEndpoints_maxResults,
listDevEndpoints_nextToken,
listDevEndpoints_tags,
ListDevEndpointsResponse (..),
newListDevEndpointsResponse,
listDevEndpointsResponse_devEndpointNames,
listDevEndpointsResponse_nextToken,
listDevEndpointsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListDevEndpoints = ListDevEndpoints'
{
ListDevEndpoints -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListDevEndpoints -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDevEndpoints -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (ListDevEndpoints -> ListDevEndpoints -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDevEndpoints -> ListDevEndpoints -> Bool
$c/= :: ListDevEndpoints -> ListDevEndpoints -> Bool
== :: ListDevEndpoints -> ListDevEndpoints -> Bool
$c== :: ListDevEndpoints -> ListDevEndpoints -> Bool
Prelude.Eq, ReadPrec [ListDevEndpoints]
ReadPrec ListDevEndpoints
Int -> ReadS ListDevEndpoints
ReadS [ListDevEndpoints]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDevEndpoints]
$creadListPrec :: ReadPrec [ListDevEndpoints]
readPrec :: ReadPrec ListDevEndpoints
$creadPrec :: ReadPrec ListDevEndpoints
readList :: ReadS [ListDevEndpoints]
$creadList :: ReadS [ListDevEndpoints]
readsPrec :: Int -> ReadS ListDevEndpoints
$creadsPrec :: Int -> ReadS ListDevEndpoints
Prelude.Read, Int -> ListDevEndpoints -> ShowS
[ListDevEndpoints] -> ShowS
ListDevEndpoints -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDevEndpoints] -> ShowS
$cshowList :: [ListDevEndpoints] -> ShowS
show :: ListDevEndpoints -> String
$cshow :: ListDevEndpoints -> String
showsPrec :: Int -> ListDevEndpoints -> ShowS
$cshowsPrec :: Int -> ListDevEndpoints -> ShowS
Prelude.Show, forall x. Rep ListDevEndpoints x -> ListDevEndpoints
forall x. ListDevEndpoints -> Rep ListDevEndpoints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDevEndpoints x -> ListDevEndpoints
$cfrom :: forall x. ListDevEndpoints -> Rep ListDevEndpoints x
Prelude.Generic)
newListDevEndpoints ::
ListDevEndpoints
newListDevEndpoints :: ListDevEndpoints
newListDevEndpoints =
ListDevEndpoints'
{ $sel:maxResults:ListDevEndpoints' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDevEndpoints' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:tags:ListDevEndpoints' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
listDevEndpoints_maxResults :: Lens.Lens' ListDevEndpoints (Prelude.Maybe Prelude.Natural)
listDevEndpoints_maxResults :: Lens' ListDevEndpoints (Maybe Natural)
listDevEndpoints_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevEndpoints' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDevEndpoints' :: ListDevEndpoints -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDevEndpoints
s@ListDevEndpoints' {} Maybe Natural
a -> ListDevEndpoints
s {$sel:maxResults:ListDevEndpoints' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDevEndpoints)
listDevEndpoints_nextToken :: Lens.Lens' ListDevEndpoints (Prelude.Maybe Prelude.Text)
listDevEndpoints_nextToken :: Lens' ListDevEndpoints (Maybe Text)
listDevEndpoints_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevEndpoints' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDevEndpoints' :: ListDevEndpoints -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDevEndpoints
s@ListDevEndpoints' {} Maybe Text
a -> ListDevEndpoints
s {$sel:nextToken:ListDevEndpoints' :: Maybe Text
nextToken = Maybe Text
a} :: ListDevEndpoints)
listDevEndpoints_tags :: Lens.Lens' ListDevEndpoints (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
listDevEndpoints_tags :: Lens' ListDevEndpoints (Maybe (HashMap Text Text))
listDevEndpoints_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevEndpoints' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ListDevEndpoints' :: ListDevEndpoints -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ListDevEndpoints
s@ListDevEndpoints' {} Maybe (HashMap Text Text)
a -> ListDevEndpoints
s {$sel:tags:ListDevEndpoints' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ListDevEndpoints) 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
instance Core.AWSRequest ListDevEndpoints where
type
AWSResponse ListDevEndpoints =
ListDevEndpointsResponse
request :: (Service -> Service)
-> ListDevEndpoints -> Request ListDevEndpoints
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 ListDevEndpoints
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDevEndpoints)))
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] -> Maybe Text -> Int -> ListDevEndpointsResponse
ListDevEndpointsResponse'
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
"DevEndpointNames"
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 (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))
)
instance Prelude.Hashable ListDevEndpoints where
hashWithSalt :: Int -> ListDevEndpoints -> Int
hashWithSalt Int
_salt ListDevEndpoints' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:tags:ListDevEndpoints' :: ListDevEndpoints -> Maybe (HashMap Text Text)
$sel:nextToken:ListDevEndpoints' :: ListDevEndpoints -> Maybe Text
$sel:maxResults:ListDevEndpoints' :: ListDevEndpoints -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData ListDevEndpoints where
rnf :: ListDevEndpoints -> ()
rnf ListDevEndpoints' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:tags:ListDevEndpoints' :: ListDevEndpoints -> Maybe (HashMap Text Text)
$sel:nextToken:ListDevEndpoints' :: ListDevEndpoints -> Maybe Text
$sel:maxResults:ListDevEndpoints' :: ListDevEndpoints -> Maybe Natural
..} =
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
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
instance Data.ToHeaders ListDevEndpoints where
toHeaders :: ListDevEndpoints -> 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
"AWSGlue.ListDevEndpoints" :: 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 ListDevEndpoints where
toJSON :: ListDevEndpoints -> Value
toJSON ListDevEndpoints' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:tags:ListDevEndpoints' :: ListDevEndpoints -> Maybe (HashMap Text Text)
$sel:nextToken:ListDevEndpoints' :: ListDevEndpoints -> Maybe Text
$sel:maxResults:ListDevEndpoints' :: ListDevEndpoints -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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,
(Key
"Tags" 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 (HashMap Text Text)
tags
]
)
instance Data.ToPath ListDevEndpoints where
toPath :: ListDevEndpoints -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ListDevEndpoints where
toQuery :: ListDevEndpoints -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data ListDevEndpointsResponse = ListDevEndpointsResponse'
{
ListDevEndpointsResponse -> Maybe [Text]
devEndpointNames :: Prelude.Maybe [Prelude.Text],
ListDevEndpointsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListDevEndpointsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListDevEndpointsResponse -> ListDevEndpointsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDevEndpointsResponse -> ListDevEndpointsResponse -> Bool
$c/= :: ListDevEndpointsResponse -> ListDevEndpointsResponse -> Bool
== :: ListDevEndpointsResponse -> ListDevEndpointsResponse -> Bool
$c== :: ListDevEndpointsResponse -> ListDevEndpointsResponse -> Bool
Prelude.Eq, ReadPrec [ListDevEndpointsResponse]
ReadPrec ListDevEndpointsResponse
Int -> ReadS ListDevEndpointsResponse
ReadS [ListDevEndpointsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDevEndpointsResponse]
$creadListPrec :: ReadPrec [ListDevEndpointsResponse]
readPrec :: ReadPrec ListDevEndpointsResponse
$creadPrec :: ReadPrec ListDevEndpointsResponse
readList :: ReadS [ListDevEndpointsResponse]
$creadList :: ReadS [ListDevEndpointsResponse]
readsPrec :: Int -> ReadS ListDevEndpointsResponse
$creadsPrec :: Int -> ReadS ListDevEndpointsResponse
Prelude.Read, Int -> ListDevEndpointsResponse -> ShowS
[ListDevEndpointsResponse] -> ShowS
ListDevEndpointsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDevEndpointsResponse] -> ShowS
$cshowList :: [ListDevEndpointsResponse] -> ShowS
show :: ListDevEndpointsResponse -> String
$cshow :: ListDevEndpointsResponse -> String
showsPrec :: Int -> ListDevEndpointsResponse -> ShowS
$cshowsPrec :: Int -> ListDevEndpointsResponse -> ShowS
Prelude.Show, forall x.
Rep ListDevEndpointsResponse x -> ListDevEndpointsResponse
forall x.
ListDevEndpointsResponse -> Rep ListDevEndpointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDevEndpointsResponse x -> ListDevEndpointsResponse
$cfrom :: forall x.
ListDevEndpointsResponse -> Rep ListDevEndpointsResponse x
Prelude.Generic)
newListDevEndpointsResponse ::
Prelude.Int ->
ListDevEndpointsResponse
newListDevEndpointsResponse :: Int -> ListDevEndpointsResponse
newListDevEndpointsResponse Int
pHttpStatus_ =
ListDevEndpointsResponse'
{ $sel:devEndpointNames:ListDevEndpointsResponse' :: Maybe [Text]
devEndpointNames =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListDevEndpointsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListDevEndpointsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listDevEndpointsResponse_devEndpointNames :: Lens.Lens' ListDevEndpointsResponse (Prelude.Maybe [Prelude.Text])
listDevEndpointsResponse_devEndpointNames :: Lens' ListDevEndpointsResponse (Maybe [Text])
listDevEndpointsResponse_devEndpointNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevEndpointsResponse' {Maybe [Text]
devEndpointNames :: Maybe [Text]
$sel:devEndpointNames:ListDevEndpointsResponse' :: ListDevEndpointsResponse -> Maybe [Text]
devEndpointNames} -> Maybe [Text]
devEndpointNames) (\s :: ListDevEndpointsResponse
s@ListDevEndpointsResponse' {} Maybe [Text]
a -> ListDevEndpointsResponse
s {$sel:devEndpointNames:ListDevEndpointsResponse' :: Maybe [Text]
devEndpointNames = Maybe [Text]
a} :: ListDevEndpointsResponse) 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
listDevEndpointsResponse_nextToken :: Lens.Lens' ListDevEndpointsResponse (Prelude.Maybe Prelude.Text)
listDevEndpointsResponse_nextToken :: Lens' ListDevEndpointsResponse (Maybe Text)
listDevEndpointsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevEndpointsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDevEndpointsResponse' :: ListDevEndpointsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDevEndpointsResponse
s@ListDevEndpointsResponse' {} Maybe Text
a -> ListDevEndpointsResponse
s {$sel:nextToken:ListDevEndpointsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDevEndpointsResponse)
listDevEndpointsResponse_httpStatus :: Lens.Lens' ListDevEndpointsResponse Prelude.Int
listDevEndpointsResponse_httpStatus :: Lens' ListDevEndpointsResponse Int
listDevEndpointsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDevEndpointsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListDevEndpointsResponse' :: ListDevEndpointsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListDevEndpointsResponse
s@ListDevEndpointsResponse' {} Int
a -> ListDevEndpointsResponse
s {$sel:httpStatus:ListDevEndpointsResponse' :: Int
httpStatus = Int
a} :: ListDevEndpointsResponse)
instance Prelude.NFData ListDevEndpointsResponse where
rnf :: ListDevEndpointsResponse -> ()
rnf ListDevEndpointsResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
devEndpointNames :: Maybe [Text]
$sel:httpStatus:ListDevEndpointsResponse' :: ListDevEndpointsResponse -> Int
$sel:nextToken:ListDevEndpointsResponse' :: ListDevEndpointsResponse -> Maybe Text
$sel:devEndpointNames:ListDevEndpointsResponse' :: ListDevEndpointsResponse -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
devEndpointNames
seq :: forall a b. a -> b -> b
`Prelude.seq` 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