{-# 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.Location.GetMapGlyphs
(
GetMapGlyphs (..),
newGetMapGlyphs,
getMapGlyphs_fontStack,
getMapGlyphs_fontUnicodeRange,
getMapGlyphs_mapName,
GetMapGlyphsResponse (..),
newGetMapGlyphsResponse,
getMapGlyphsResponse_blob,
getMapGlyphsResponse_contentType,
getMapGlyphsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Location.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetMapGlyphs = GetMapGlyphs'
{
GetMapGlyphs -> Text
fontStack :: Prelude.Text,
GetMapGlyphs -> Text
fontUnicodeRange :: Prelude.Text,
GetMapGlyphs -> Text
mapName :: Prelude.Text
}
deriving (GetMapGlyphs -> GetMapGlyphs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMapGlyphs -> GetMapGlyphs -> Bool
$c/= :: GetMapGlyphs -> GetMapGlyphs -> Bool
== :: GetMapGlyphs -> GetMapGlyphs -> Bool
$c== :: GetMapGlyphs -> GetMapGlyphs -> Bool
Prelude.Eq, ReadPrec [GetMapGlyphs]
ReadPrec GetMapGlyphs
Int -> ReadS GetMapGlyphs
ReadS [GetMapGlyphs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMapGlyphs]
$creadListPrec :: ReadPrec [GetMapGlyphs]
readPrec :: ReadPrec GetMapGlyphs
$creadPrec :: ReadPrec GetMapGlyphs
readList :: ReadS [GetMapGlyphs]
$creadList :: ReadS [GetMapGlyphs]
readsPrec :: Int -> ReadS GetMapGlyphs
$creadsPrec :: Int -> ReadS GetMapGlyphs
Prelude.Read, Int -> GetMapGlyphs -> ShowS
[GetMapGlyphs] -> ShowS
GetMapGlyphs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMapGlyphs] -> ShowS
$cshowList :: [GetMapGlyphs] -> ShowS
show :: GetMapGlyphs -> String
$cshow :: GetMapGlyphs -> String
showsPrec :: Int -> GetMapGlyphs -> ShowS
$cshowsPrec :: Int -> GetMapGlyphs -> ShowS
Prelude.Show, forall x. Rep GetMapGlyphs x -> GetMapGlyphs
forall x. GetMapGlyphs -> Rep GetMapGlyphs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMapGlyphs x -> GetMapGlyphs
$cfrom :: forall x. GetMapGlyphs -> Rep GetMapGlyphs x
Prelude.Generic)
newGetMapGlyphs ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
GetMapGlyphs
newGetMapGlyphs :: Text -> Text -> Text -> GetMapGlyphs
newGetMapGlyphs
Text
pFontStack_
Text
pFontUnicodeRange_
Text
pMapName_ =
GetMapGlyphs'
{ $sel:fontStack:GetMapGlyphs' :: Text
fontStack = Text
pFontStack_,
$sel:fontUnicodeRange:GetMapGlyphs' :: Text
fontUnicodeRange = Text
pFontUnicodeRange_,
$sel:mapName:GetMapGlyphs' :: Text
mapName = Text
pMapName_
}
getMapGlyphs_fontStack :: Lens.Lens' GetMapGlyphs Prelude.Text
getMapGlyphs_fontStack :: Lens' GetMapGlyphs Text
getMapGlyphs_fontStack = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMapGlyphs' {Text
fontStack :: Text
$sel:fontStack:GetMapGlyphs' :: GetMapGlyphs -> Text
fontStack} -> Text
fontStack) (\s :: GetMapGlyphs
s@GetMapGlyphs' {} Text
a -> GetMapGlyphs
s {$sel:fontStack:GetMapGlyphs' :: Text
fontStack = Text
a} :: GetMapGlyphs)
getMapGlyphs_fontUnicodeRange :: Lens.Lens' GetMapGlyphs Prelude.Text
getMapGlyphs_fontUnicodeRange :: Lens' GetMapGlyphs Text
getMapGlyphs_fontUnicodeRange = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMapGlyphs' {Text
fontUnicodeRange :: Text
$sel:fontUnicodeRange:GetMapGlyphs' :: GetMapGlyphs -> Text
fontUnicodeRange} -> Text
fontUnicodeRange) (\s :: GetMapGlyphs
s@GetMapGlyphs' {} Text
a -> GetMapGlyphs
s {$sel:fontUnicodeRange:GetMapGlyphs' :: Text
fontUnicodeRange = Text
a} :: GetMapGlyphs)
getMapGlyphs_mapName :: Lens.Lens' GetMapGlyphs Prelude.Text
getMapGlyphs_mapName :: Lens' GetMapGlyphs Text
getMapGlyphs_mapName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMapGlyphs' {Text
mapName :: Text
$sel:mapName:GetMapGlyphs' :: GetMapGlyphs -> Text
mapName} -> Text
mapName) (\s :: GetMapGlyphs
s@GetMapGlyphs' {} Text
a -> GetMapGlyphs
s {$sel:mapName:GetMapGlyphs' :: Text
mapName = Text
a} :: GetMapGlyphs)
instance Core.AWSRequest GetMapGlyphs where
type AWSResponse GetMapGlyphs = GetMapGlyphsResponse
request :: (Service -> Service) -> GetMapGlyphs -> Request GetMapGlyphs
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 GetMapGlyphs
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMapGlyphs)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int
-> ResponseHeaders -> ByteString -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveBytes
( \Int
s ResponseHeaders
h ByteString
x ->
Maybe ByteString -> Maybe Text -> Int -> GetMapGlyphsResponse
GetMapGlyphsResponse'
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. a -> Maybe a
Prelude.Just (coerce :: forall a b. Coercible a b => a -> b
Prelude.coerce ByteString
x)))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Data..#? HeaderName
"Content-Type")
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 GetMapGlyphs where
hashWithSalt :: Int -> GetMapGlyphs -> Int
hashWithSalt Int
_salt GetMapGlyphs' {Text
mapName :: Text
fontUnicodeRange :: Text
fontStack :: Text
$sel:mapName:GetMapGlyphs' :: GetMapGlyphs -> Text
$sel:fontUnicodeRange:GetMapGlyphs' :: GetMapGlyphs -> Text
$sel:fontStack:GetMapGlyphs' :: GetMapGlyphs -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
fontStack
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
fontUnicodeRange
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
mapName
instance Prelude.NFData GetMapGlyphs where
rnf :: GetMapGlyphs -> ()
rnf GetMapGlyphs' {Text
mapName :: Text
fontUnicodeRange :: Text
fontStack :: Text
$sel:mapName:GetMapGlyphs' :: GetMapGlyphs -> Text
$sel:fontUnicodeRange:GetMapGlyphs' :: GetMapGlyphs -> Text
$sel:fontStack:GetMapGlyphs' :: GetMapGlyphs -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
fontStack
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
fontUnicodeRange
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
mapName
instance Data.ToHeaders GetMapGlyphs where
toHeaders :: GetMapGlyphs -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetMapGlyphs where
toPath :: GetMapGlyphs -> ByteString
toPath GetMapGlyphs' {Text
mapName :: Text
fontUnicodeRange :: Text
fontStack :: Text
$sel:mapName:GetMapGlyphs' :: GetMapGlyphs -> Text
$sel:fontUnicodeRange:GetMapGlyphs' :: GetMapGlyphs -> Text
$sel:fontStack:GetMapGlyphs' :: GetMapGlyphs -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/maps/v0/maps/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
mapName,
ByteString
"/glyphs/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
fontStack,
ByteString
"/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
fontUnicodeRange
]
instance Data.ToQuery GetMapGlyphs where
toQuery :: GetMapGlyphs -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetMapGlyphsResponse = GetMapGlyphsResponse'
{
GetMapGlyphsResponse -> Maybe ByteString
blob :: Prelude.Maybe Prelude.ByteString,
GetMapGlyphsResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
GetMapGlyphsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetMapGlyphsResponse -> GetMapGlyphsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMapGlyphsResponse -> GetMapGlyphsResponse -> Bool
$c/= :: GetMapGlyphsResponse -> GetMapGlyphsResponse -> Bool
== :: GetMapGlyphsResponse -> GetMapGlyphsResponse -> Bool
$c== :: GetMapGlyphsResponse -> GetMapGlyphsResponse -> Bool
Prelude.Eq, ReadPrec [GetMapGlyphsResponse]
ReadPrec GetMapGlyphsResponse
Int -> ReadS GetMapGlyphsResponse
ReadS [GetMapGlyphsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMapGlyphsResponse]
$creadListPrec :: ReadPrec [GetMapGlyphsResponse]
readPrec :: ReadPrec GetMapGlyphsResponse
$creadPrec :: ReadPrec GetMapGlyphsResponse
readList :: ReadS [GetMapGlyphsResponse]
$creadList :: ReadS [GetMapGlyphsResponse]
readsPrec :: Int -> ReadS GetMapGlyphsResponse
$creadsPrec :: Int -> ReadS GetMapGlyphsResponse
Prelude.Read, Int -> GetMapGlyphsResponse -> ShowS
[GetMapGlyphsResponse] -> ShowS
GetMapGlyphsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMapGlyphsResponse] -> ShowS
$cshowList :: [GetMapGlyphsResponse] -> ShowS
show :: GetMapGlyphsResponse -> String
$cshow :: GetMapGlyphsResponse -> String
showsPrec :: Int -> GetMapGlyphsResponse -> ShowS
$cshowsPrec :: Int -> GetMapGlyphsResponse -> ShowS
Prelude.Show, forall x. Rep GetMapGlyphsResponse x -> GetMapGlyphsResponse
forall x. GetMapGlyphsResponse -> Rep GetMapGlyphsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMapGlyphsResponse x -> GetMapGlyphsResponse
$cfrom :: forall x. GetMapGlyphsResponse -> Rep GetMapGlyphsResponse x
Prelude.Generic)
newGetMapGlyphsResponse ::
Prelude.Int ->
GetMapGlyphsResponse
newGetMapGlyphsResponse :: Int -> GetMapGlyphsResponse
newGetMapGlyphsResponse Int
pHttpStatus_ =
GetMapGlyphsResponse'
{ $sel:blob:GetMapGlyphsResponse' :: Maybe ByteString
blob = forall a. Maybe a
Prelude.Nothing,
$sel:contentType:GetMapGlyphsResponse' :: Maybe Text
contentType = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetMapGlyphsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getMapGlyphsResponse_blob :: Lens.Lens' GetMapGlyphsResponse (Prelude.Maybe Prelude.ByteString)
getMapGlyphsResponse_blob :: Lens' GetMapGlyphsResponse (Maybe ByteString)
getMapGlyphsResponse_blob = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMapGlyphsResponse' {Maybe ByteString
blob :: Maybe ByteString
$sel:blob:GetMapGlyphsResponse' :: GetMapGlyphsResponse -> Maybe ByteString
blob} -> Maybe ByteString
blob) (\s :: GetMapGlyphsResponse
s@GetMapGlyphsResponse' {} Maybe ByteString
a -> GetMapGlyphsResponse
s {$sel:blob:GetMapGlyphsResponse' :: Maybe ByteString
blob = Maybe ByteString
a} :: GetMapGlyphsResponse)
getMapGlyphsResponse_contentType :: Lens.Lens' GetMapGlyphsResponse (Prelude.Maybe Prelude.Text)
getMapGlyphsResponse_contentType :: Lens' GetMapGlyphsResponse (Maybe Text)
getMapGlyphsResponse_contentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMapGlyphsResponse' {Maybe Text
contentType :: Maybe Text
$sel:contentType:GetMapGlyphsResponse' :: GetMapGlyphsResponse -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: GetMapGlyphsResponse
s@GetMapGlyphsResponse' {} Maybe Text
a -> GetMapGlyphsResponse
s {$sel:contentType:GetMapGlyphsResponse' :: Maybe Text
contentType = Maybe Text
a} :: GetMapGlyphsResponse)
getMapGlyphsResponse_httpStatus :: Lens.Lens' GetMapGlyphsResponse Prelude.Int
getMapGlyphsResponse_httpStatus :: Lens' GetMapGlyphsResponse Int
getMapGlyphsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMapGlyphsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetMapGlyphsResponse' :: GetMapGlyphsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetMapGlyphsResponse
s@GetMapGlyphsResponse' {} Int
a -> GetMapGlyphsResponse
s {$sel:httpStatus:GetMapGlyphsResponse' :: Int
httpStatus = Int
a} :: GetMapGlyphsResponse)
instance Prelude.NFData GetMapGlyphsResponse where
rnf :: GetMapGlyphsResponse -> ()
rnf GetMapGlyphsResponse' {Int
Maybe ByteString
Maybe Text
httpStatus :: Int
contentType :: Maybe Text
blob :: Maybe ByteString
$sel:httpStatus:GetMapGlyphsResponse' :: GetMapGlyphsResponse -> Int
$sel:contentType:GetMapGlyphsResponse' :: GetMapGlyphsResponse -> Maybe Text
$sel:blob:GetMapGlyphsResponse' :: GetMapGlyphsResponse -> Maybe ByteString
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ByteString
blob
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contentType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus