{-# 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.APIGateway.GetDocumentationParts
(
GetDocumentationParts (..),
newGetDocumentationParts,
getDocumentationParts_path,
getDocumentationParts_locationStatus,
getDocumentationParts_nameQuery,
getDocumentationParts_limit,
getDocumentationParts_type,
getDocumentationParts_position,
getDocumentationParts_restApiId,
GetDocumentationPartsResponse (..),
newGetDocumentationPartsResponse,
getDocumentationPartsResponse_items,
getDocumentationPartsResponse_position,
getDocumentationPartsResponse_httpStatus,
)
where
import Amazonka.APIGateway.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetDocumentationParts = GetDocumentationParts'
{
GetDocumentationParts -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
GetDocumentationParts -> Maybe LocationStatusType
locationStatus :: Prelude.Maybe LocationStatusType,
GetDocumentationParts -> Maybe Text
nameQuery :: Prelude.Maybe Prelude.Text,
GetDocumentationParts -> Maybe Int
limit :: Prelude.Maybe Prelude.Int,
GetDocumentationParts -> Maybe DocumentationPartType
type' :: Prelude.Maybe DocumentationPartType,
GetDocumentationParts -> Maybe Text
position :: Prelude.Maybe Prelude.Text,
GetDocumentationParts -> Text
restApiId :: Prelude.Text
}
deriving (GetDocumentationParts -> GetDocumentationParts -> Bool
(GetDocumentationParts -> GetDocumentationParts -> Bool)
-> (GetDocumentationParts -> GetDocumentationParts -> Bool)
-> Eq GetDocumentationParts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentationParts -> GetDocumentationParts -> Bool
$c/= :: GetDocumentationParts -> GetDocumentationParts -> Bool
== :: GetDocumentationParts -> GetDocumentationParts -> Bool
$c== :: GetDocumentationParts -> GetDocumentationParts -> Bool
Prelude.Eq, ReadPrec [GetDocumentationParts]
ReadPrec GetDocumentationParts
Int -> ReadS GetDocumentationParts
ReadS [GetDocumentationParts]
(Int -> ReadS GetDocumentationParts)
-> ReadS [GetDocumentationParts]
-> ReadPrec GetDocumentationParts
-> ReadPrec [GetDocumentationParts]
-> Read GetDocumentationParts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentationParts]
$creadListPrec :: ReadPrec [GetDocumentationParts]
readPrec :: ReadPrec GetDocumentationParts
$creadPrec :: ReadPrec GetDocumentationParts
readList :: ReadS [GetDocumentationParts]
$creadList :: ReadS [GetDocumentationParts]
readsPrec :: Int -> ReadS GetDocumentationParts
$creadsPrec :: Int -> ReadS GetDocumentationParts
Prelude.Read, Int -> GetDocumentationParts -> ShowS
[GetDocumentationParts] -> ShowS
GetDocumentationParts -> String
(Int -> GetDocumentationParts -> ShowS)
-> (GetDocumentationParts -> String)
-> ([GetDocumentationParts] -> ShowS)
-> Show GetDocumentationParts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentationParts] -> ShowS
$cshowList :: [GetDocumentationParts] -> ShowS
show :: GetDocumentationParts -> String
$cshow :: GetDocumentationParts -> String
showsPrec :: Int -> GetDocumentationParts -> ShowS
$cshowsPrec :: Int -> GetDocumentationParts -> ShowS
Prelude.Show, (forall x. GetDocumentationParts -> Rep GetDocumentationParts x)
-> (forall x. Rep GetDocumentationParts x -> GetDocumentationParts)
-> Generic GetDocumentationParts
forall x. Rep GetDocumentationParts x -> GetDocumentationParts
forall x. GetDocumentationParts -> Rep GetDocumentationParts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDocumentationParts x -> GetDocumentationParts
$cfrom :: forall x. GetDocumentationParts -> Rep GetDocumentationParts x
Prelude.Generic)
newGetDocumentationParts ::
Prelude.Text ->
GetDocumentationParts
newGetDocumentationParts :: Text -> GetDocumentationParts
newGetDocumentationParts Text
pRestApiId_ =
GetDocumentationParts' :: Maybe Text
-> Maybe LocationStatusType
-> Maybe Text
-> Maybe Int
-> Maybe DocumentationPartType
-> Maybe Text
-> Text
-> GetDocumentationParts
GetDocumentationParts'
{ $sel:path:GetDocumentationParts' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:locationStatus:GetDocumentationParts' :: Maybe LocationStatusType
locationStatus = Maybe LocationStatusType
forall a. Maybe a
Prelude.Nothing,
$sel:nameQuery:GetDocumentationParts' :: Maybe Text
nameQuery = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:GetDocumentationParts' :: Maybe Int
limit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:type':GetDocumentationParts' :: Maybe DocumentationPartType
type' = Maybe DocumentationPartType
forall a. Maybe a
Prelude.Nothing,
$sel:position:GetDocumentationParts' :: Maybe Text
position = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:restApiId:GetDocumentationParts' :: Text
restApiId = Text
pRestApiId_
}
getDocumentationParts_path :: Lens.Lens' GetDocumentationParts (Prelude.Maybe Prelude.Text)
getDocumentationParts_path :: (Maybe Text -> f (Maybe Text))
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_path = (GetDocumentationParts -> Maybe Text)
-> (GetDocumentationParts -> Maybe Text -> GetDocumentationParts)
-> Lens
GetDocumentationParts
GetDocumentationParts
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Maybe Text
path :: Maybe Text
$sel:path:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
path} -> Maybe Text
path) (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Maybe Text
a -> GetDocumentationParts
s {$sel:path:GetDocumentationParts' :: Maybe Text
path = Maybe Text
a} :: GetDocumentationParts)
getDocumentationParts_locationStatus :: Lens.Lens' GetDocumentationParts (Prelude.Maybe LocationStatusType)
getDocumentationParts_locationStatus :: (Maybe LocationStatusType -> f (Maybe LocationStatusType))
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_locationStatus = (GetDocumentationParts -> Maybe LocationStatusType)
-> (GetDocumentationParts
-> Maybe LocationStatusType -> GetDocumentationParts)
-> Lens
GetDocumentationParts
GetDocumentationParts
(Maybe LocationStatusType)
(Maybe LocationStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Maybe LocationStatusType
locationStatus :: Maybe LocationStatusType
$sel:locationStatus:GetDocumentationParts' :: GetDocumentationParts -> Maybe LocationStatusType
locationStatus} -> Maybe LocationStatusType
locationStatus) (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Maybe LocationStatusType
a -> GetDocumentationParts
s {$sel:locationStatus:GetDocumentationParts' :: Maybe LocationStatusType
locationStatus = Maybe LocationStatusType
a} :: GetDocumentationParts)
getDocumentationParts_nameQuery :: Lens.Lens' GetDocumentationParts (Prelude.Maybe Prelude.Text)
getDocumentationParts_nameQuery :: (Maybe Text -> f (Maybe Text))
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_nameQuery = (GetDocumentationParts -> Maybe Text)
-> (GetDocumentationParts -> Maybe Text -> GetDocumentationParts)
-> Lens
GetDocumentationParts
GetDocumentationParts
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Maybe Text
nameQuery :: Maybe Text
$sel:nameQuery:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
nameQuery} -> Maybe Text
nameQuery) (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Maybe Text
a -> GetDocumentationParts
s {$sel:nameQuery:GetDocumentationParts' :: Maybe Text
nameQuery = Maybe Text
a} :: GetDocumentationParts)
getDocumentationParts_limit :: Lens.Lens' GetDocumentationParts (Prelude.Maybe Prelude.Int)
getDocumentationParts_limit :: (Maybe Int -> f (Maybe Int))
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_limit = (GetDocumentationParts -> Maybe Int)
-> (GetDocumentationParts -> Maybe Int -> GetDocumentationParts)
-> Lens
GetDocumentationParts GetDocumentationParts (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Maybe Int
limit :: Maybe Int
$sel:limit:GetDocumentationParts' :: GetDocumentationParts -> Maybe Int
limit} -> Maybe Int
limit) (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Maybe Int
a -> GetDocumentationParts
s {$sel:limit:GetDocumentationParts' :: Maybe Int
limit = Maybe Int
a} :: GetDocumentationParts)
getDocumentationParts_type :: Lens.Lens' GetDocumentationParts (Prelude.Maybe DocumentationPartType)
getDocumentationParts_type :: (Maybe DocumentationPartType -> f (Maybe DocumentationPartType))
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_type = (GetDocumentationParts -> Maybe DocumentationPartType)
-> (GetDocumentationParts
-> Maybe DocumentationPartType -> GetDocumentationParts)
-> Lens
GetDocumentationParts
GetDocumentationParts
(Maybe DocumentationPartType)
(Maybe DocumentationPartType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Maybe DocumentationPartType
type' :: Maybe DocumentationPartType
$sel:type':GetDocumentationParts' :: GetDocumentationParts -> Maybe DocumentationPartType
type'} -> Maybe DocumentationPartType
type') (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Maybe DocumentationPartType
a -> GetDocumentationParts
s {$sel:type':GetDocumentationParts' :: Maybe DocumentationPartType
type' = Maybe DocumentationPartType
a} :: GetDocumentationParts)
getDocumentationParts_position :: Lens.Lens' GetDocumentationParts (Prelude.Maybe Prelude.Text)
getDocumentationParts_position :: (Maybe Text -> f (Maybe Text))
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_position = (GetDocumentationParts -> Maybe Text)
-> (GetDocumentationParts -> Maybe Text -> GetDocumentationParts)
-> Lens
GetDocumentationParts
GetDocumentationParts
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Maybe Text
position :: Maybe Text
$sel:position:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
position} -> Maybe Text
position) (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Maybe Text
a -> GetDocumentationParts
s {$sel:position:GetDocumentationParts' :: Maybe Text
position = Maybe Text
a} :: GetDocumentationParts)
getDocumentationParts_restApiId :: Lens.Lens' GetDocumentationParts Prelude.Text
getDocumentationParts_restApiId :: (Text -> f Text)
-> GetDocumentationParts -> f GetDocumentationParts
getDocumentationParts_restApiId = (GetDocumentationParts -> Text)
-> (GetDocumentationParts -> Text -> GetDocumentationParts)
-> Lens GetDocumentationParts GetDocumentationParts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationParts' {Text
restApiId :: Text
$sel:restApiId:GetDocumentationParts' :: GetDocumentationParts -> Text
restApiId} -> Text
restApiId) (\s :: GetDocumentationParts
s@GetDocumentationParts' {} Text
a -> GetDocumentationParts
s {$sel:restApiId:GetDocumentationParts' :: Text
restApiId = Text
a} :: GetDocumentationParts)
instance Core.AWSPager GetDocumentationParts where
page :: GetDocumentationParts
-> AWSResponse GetDocumentationParts -> Maybe GetDocumentationParts
page GetDocumentationParts
rq AWSResponse GetDocumentationParts
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetDocumentationParts
GetDocumentationPartsResponse
rs
GetDocumentationPartsResponse
-> Getting (First Text) GetDocumentationPartsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDocumentationPartsResponse
-> Const (First Text) GetDocumentationPartsResponse
Lens' GetDocumentationPartsResponse (Maybe Text)
getDocumentationPartsResponse_position
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetDocumentationPartsResponse
-> Const (First Text) GetDocumentationPartsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDocumentationPartsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetDocumentationParts
forall a. Maybe a
Prelude.Nothing
| Maybe [DocumentationPart] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetDocumentationParts
GetDocumentationPartsResponse
rs
GetDocumentationPartsResponse
-> Getting
(First [DocumentationPart])
GetDocumentationPartsResponse
[DocumentationPart]
-> Maybe [DocumentationPart]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DocumentationPart]
-> Const (First [DocumentationPart]) (Maybe [DocumentationPart]))
-> GetDocumentationPartsResponse
-> Const (First [DocumentationPart]) GetDocumentationPartsResponse
Lens' GetDocumentationPartsResponse (Maybe [DocumentationPart])
getDocumentationPartsResponse_items
((Maybe [DocumentationPart]
-> Const (First [DocumentationPart]) (Maybe [DocumentationPart]))
-> GetDocumentationPartsResponse
-> Const (First [DocumentationPart]) GetDocumentationPartsResponse)
-> (([DocumentationPart]
-> Const (First [DocumentationPart]) [DocumentationPart])
-> Maybe [DocumentationPart]
-> Const (First [DocumentationPart]) (Maybe [DocumentationPart]))
-> Getting
(First [DocumentationPart])
GetDocumentationPartsResponse
[DocumentationPart]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DocumentationPart]
-> Const (First [DocumentationPart]) [DocumentationPart])
-> Maybe [DocumentationPart]
-> Const (First [DocumentationPart]) (Maybe [DocumentationPart])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetDocumentationParts
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetDocumentationParts -> Maybe GetDocumentationParts
forall a. a -> Maybe a
Prelude.Just (GetDocumentationParts -> Maybe GetDocumentationParts)
-> GetDocumentationParts -> Maybe GetDocumentationParts
forall a b. (a -> b) -> a -> b
Prelude.$
GetDocumentationParts
rq
GetDocumentationParts
-> (GetDocumentationParts -> GetDocumentationParts)
-> GetDocumentationParts
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetDocumentationParts -> Identity GetDocumentationParts
Lens
GetDocumentationParts
GetDocumentationParts
(Maybe Text)
(Maybe Text)
getDocumentationParts_position
((Maybe Text -> Identity (Maybe Text))
-> GetDocumentationParts -> Identity GetDocumentationParts)
-> Maybe Text -> GetDocumentationParts -> GetDocumentationParts
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetDocumentationParts
GetDocumentationPartsResponse
rs
GetDocumentationPartsResponse
-> Getting (First Text) GetDocumentationPartsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetDocumentationPartsResponse
-> Const (First Text) GetDocumentationPartsResponse
Lens' GetDocumentationPartsResponse (Maybe Text)
getDocumentationPartsResponse_position
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetDocumentationPartsResponse
-> Const (First Text) GetDocumentationPartsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetDocumentationPartsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest GetDocumentationParts where
type
AWSResponse GetDocumentationParts =
GetDocumentationPartsResponse
request :: GetDocumentationParts -> Request GetDocumentationParts
request = Service -> GetDocumentationParts -> Request GetDocumentationParts
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetDocumentationParts
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDocumentationParts)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetDocumentationParts))
-> Logger
-> Service
-> Proxy GetDocumentationParts
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetDocumentationParts)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [DocumentationPart]
-> Maybe Text -> Int -> GetDocumentationPartsResponse
GetDocumentationPartsResponse'
(Maybe [DocumentationPart]
-> Maybe Text -> Int -> GetDocumentationPartsResponse)
-> Either String (Maybe [DocumentationPart])
-> Either
String (Maybe Text -> Int -> GetDocumentationPartsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [DocumentationPart]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"item" Either String (Maybe (Maybe [DocumentationPart]))
-> Maybe [DocumentationPart]
-> Either String (Maybe [DocumentationPart])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DocumentationPart]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> GetDocumentationPartsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetDocumentationPartsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"position")
Either String (Int -> GetDocumentationPartsResponse)
-> Either String Int -> Either String GetDocumentationPartsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetDocumentationParts
instance Prelude.NFData GetDocumentationParts
instance Core.ToHeaders GetDocumentationParts where
toHeaders :: GetDocumentationParts -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetDocumentationParts -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Core.ToPath GetDocumentationParts where
toPath :: GetDocumentationParts -> ByteString
toPath GetDocumentationParts' {Maybe Int
Maybe Text
Maybe DocumentationPartType
Maybe LocationStatusType
Text
restApiId :: Text
position :: Maybe Text
type' :: Maybe DocumentationPartType
limit :: Maybe Int
nameQuery :: Maybe Text
locationStatus :: Maybe LocationStatusType
path :: Maybe Text
$sel:restApiId:GetDocumentationParts' :: GetDocumentationParts -> Text
$sel:position:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
$sel:type':GetDocumentationParts' :: GetDocumentationParts -> Maybe DocumentationPartType
$sel:limit:GetDocumentationParts' :: GetDocumentationParts -> Maybe Int
$sel:nameQuery:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
$sel:locationStatus:GetDocumentationParts' :: GetDocumentationParts -> Maybe LocationStatusType
$sel:path:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/restapis/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
restApiId,
ByteString
"/documentation/parts"
]
instance Core.ToQuery GetDocumentationParts where
toQuery :: GetDocumentationParts -> QueryString
toQuery GetDocumentationParts' {Maybe Int
Maybe Text
Maybe DocumentationPartType
Maybe LocationStatusType
Text
restApiId :: Text
position :: Maybe Text
type' :: Maybe DocumentationPartType
limit :: Maybe Int
nameQuery :: Maybe Text
locationStatus :: Maybe LocationStatusType
path :: Maybe Text
$sel:restApiId:GetDocumentationParts' :: GetDocumentationParts -> Text
$sel:position:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
$sel:type':GetDocumentationParts' :: GetDocumentationParts -> Maybe DocumentationPartType
$sel:limit:GetDocumentationParts' :: GetDocumentationParts -> Maybe Int
$sel:nameQuery:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
$sel:locationStatus:GetDocumentationParts' :: GetDocumentationParts -> Maybe LocationStatusType
$sel:path:GetDocumentationParts' :: GetDocumentationParts -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"path" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
path,
ByteString
"locationStatus" ByteString -> Maybe LocationStatusType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe LocationStatusType
locationStatus,
ByteString
"name" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nameQuery,
ByteString
"limit" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
limit,
ByteString
"type" ByteString -> Maybe DocumentationPartType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe DocumentationPartType
type',
ByteString
"position" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
position
]
data GetDocumentationPartsResponse = GetDocumentationPartsResponse'
{
GetDocumentationPartsResponse -> Maybe [DocumentationPart]
items :: Prelude.Maybe [DocumentationPart],
GetDocumentationPartsResponse -> Maybe Text
position :: Prelude.Maybe Prelude.Text,
GetDocumentationPartsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool
(GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool)
-> (GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool)
-> Eq GetDocumentationPartsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool
$c/= :: GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool
== :: GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool
$c== :: GetDocumentationPartsResponse
-> GetDocumentationPartsResponse -> Bool
Prelude.Eq, ReadPrec [GetDocumentationPartsResponse]
ReadPrec GetDocumentationPartsResponse
Int -> ReadS GetDocumentationPartsResponse
ReadS [GetDocumentationPartsResponse]
(Int -> ReadS GetDocumentationPartsResponse)
-> ReadS [GetDocumentationPartsResponse]
-> ReadPrec GetDocumentationPartsResponse
-> ReadPrec [GetDocumentationPartsResponse]
-> Read GetDocumentationPartsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDocumentationPartsResponse]
$creadListPrec :: ReadPrec [GetDocumentationPartsResponse]
readPrec :: ReadPrec GetDocumentationPartsResponse
$creadPrec :: ReadPrec GetDocumentationPartsResponse
readList :: ReadS [GetDocumentationPartsResponse]
$creadList :: ReadS [GetDocumentationPartsResponse]
readsPrec :: Int -> ReadS GetDocumentationPartsResponse
$creadsPrec :: Int -> ReadS GetDocumentationPartsResponse
Prelude.Read, Int -> GetDocumentationPartsResponse -> ShowS
[GetDocumentationPartsResponse] -> ShowS
GetDocumentationPartsResponse -> String
(Int -> GetDocumentationPartsResponse -> ShowS)
-> (GetDocumentationPartsResponse -> String)
-> ([GetDocumentationPartsResponse] -> ShowS)
-> Show GetDocumentationPartsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDocumentationPartsResponse] -> ShowS
$cshowList :: [GetDocumentationPartsResponse] -> ShowS
show :: GetDocumentationPartsResponse -> String
$cshow :: GetDocumentationPartsResponse -> String
showsPrec :: Int -> GetDocumentationPartsResponse -> ShowS
$cshowsPrec :: Int -> GetDocumentationPartsResponse -> ShowS
Prelude.Show, (forall x.
GetDocumentationPartsResponse
-> Rep GetDocumentationPartsResponse x)
-> (forall x.
Rep GetDocumentationPartsResponse x
-> GetDocumentationPartsResponse)
-> Generic GetDocumentationPartsResponse
forall x.
Rep GetDocumentationPartsResponse x
-> GetDocumentationPartsResponse
forall x.
GetDocumentationPartsResponse
-> Rep GetDocumentationPartsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDocumentationPartsResponse x
-> GetDocumentationPartsResponse
$cfrom :: forall x.
GetDocumentationPartsResponse
-> Rep GetDocumentationPartsResponse x
Prelude.Generic)
newGetDocumentationPartsResponse ::
Prelude.Int ->
GetDocumentationPartsResponse
newGetDocumentationPartsResponse :: Int -> GetDocumentationPartsResponse
newGetDocumentationPartsResponse Int
pHttpStatus_ =
GetDocumentationPartsResponse' :: Maybe [DocumentationPart]
-> Maybe Text -> Int -> GetDocumentationPartsResponse
GetDocumentationPartsResponse'
{ $sel:items:GetDocumentationPartsResponse' :: Maybe [DocumentationPart]
items =
Maybe [DocumentationPart]
forall a. Maybe a
Prelude.Nothing,
$sel:position:GetDocumentationPartsResponse' :: Maybe Text
position = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetDocumentationPartsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getDocumentationPartsResponse_items :: Lens.Lens' GetDocumentationPartsResponse (Prelude.Maybe [DocumentationPart])
getDocumentationPartsResponse_items :: (Maybe [DocumentationPart] -> f (Maybe [DocumentationPart]))
-> GetDocumentationPartsResponse -> f GetDocumentationPartsResponse
getDocumentationPartsResponse_items = (GetDocumentationPartsResponse -> Maybe [DocumentationPart])
-> (GetDocumentationPartsResponse
-> Maybe [DocumentationPart] -> GetDocumentationPartsResponse)
-> Lens' GetDocumentationPartsResponse (Maybe [DocumentationPart])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationPartsResponse' {Maybe [DocumentationPart]
items :: Maybe [DocumentationPart]
$sel:items:GetDocumentationPartsResponse' :: GetDocumentationPartsResponse -> Maybe [DocumentationPart]
items} -> Maybe [DocumentationPart]
items) (\s :: GetDocumentationPartsResponse
s@GetDocumentationPartsResponse' {} Maybe [DocumentationPart]
a -> GetDocumentationPartsResponse
s {$sel:items:GetDocumentationPartsResponse' :: Maybe [DocumentationPart]
items = Maybe [DocumentationPart]
a} :: GetDocumentationPartsResponse) ((Maybe [DocumentationPart] -> f (Maybe [DocumentationPart]))
-> GetDocumentationPartsResponse
-> f GetDocumentationPartsResponse)
-> ((Maybe [DocumentationPart] -> f (Maybe [DocumentationPart]))
-> Maybe [DocumentationPart] -> f (Maybe [DocumentationPart]))
-> (Maybe [DocumentationPart] -> f (Maybe [DocumentationPart]))
-> GetDocumentationPartsResponse
-> f GetDocumentationPartsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DocumentationPart]
[DocumentationPart]
[DocumentationPart]
[DocumentationPart]
-> Iso
(Maybe [DocumentationPart])
(Maybe [DocumentationPart])
(Maybe [DocumentationPart])
(Maybe [DocumentationPart])
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 AnIso
[DocumentationPart]
[DocumentationPart]
[DocumentationPart]
[DocumentationPart]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getDocumentationPartsResponse_position :: Lens.Lens' GetDocumentationPartsResponse (Prelude.Maybe Prelude.Text)
getDocumentationPartsResponse_position :: (Maybe Text -> f (Maybe Text))
-> GetDocumentationPartsResponse -> f GetDocumentationPartsResponse
getDocumentationPartsResponse_position = (GetDocumentationPartsResponse -> Maybe Text)
-> (GetDocumentationPartsResponse
-> Maybe Text -> GetDocumentationPartsResponse)
-> Lens' GetDocumentationPartsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationPartsResponse' {Maybe Text
position :: Maybe Text
$sel:position:GetDocumentationPartsResponse' :: GetDocumentationPartsResponse -> Maybe Text
position} -> Maybe Text
position) (\s :: GetDocumentationPartsResponse
s@GetDocumentationPartsResponse' {} Maybe Text
a -> GetDocumentationPartsResponse
s {$sel:position:GetDocumentationPartsResponse' :: Maybe Text
position = Maybe Text
a} :: GetDocumentationPartsResponse)
getDocumentationPartsResponse_httpStatus :: Lens.Lens' GetDocumentationPartsResponse Prelude.Int
getDocumentationPartsResponse_httpStatus :: (Int -> f Int)
-> GetDocumentationPartsResponse -> f GetDocumentationPartsResponse
getDocumentationPartsResponse_httpStatus = (GetDocumentationPartsResponse -> Int)
-> (GetDocumentationPartsResponse
-> Int -> GetDocumentationPartsResponse)
-> Lens
GetDocumentationPartsResponse GetDocumentationPartsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDocumentationPartsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDocumentationPartsResponse' :: GetDocumentationPartsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDocumentationPartsResponse
s@GetDocumentationPartsResponse' {} Int
a -> GetDocumentationPartsResponse
s {$sel:httpStatus:GetDocumentationPartsResponse' :: Int
httpStatus = Int
a} :: GetDocumentationPartsResponse)
instance Prelude.NFData GetDocumentationPartsResponse