{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Gogol.URLShortener.Url.List
(
URLShortenerUrlListResource,
URLShortenerUrlList (..),
newURLShortenerUrlList,
)
where
import Gogol.Prelude qualified as Core
import Gogol.URLShortener.Types
type URLShortenerUrlListResource =
"urlshortener"
Core.:> "v1"
Core.:> "url"
Core.:> "history"
Core.:> Core.QueryParam "projection" UrlListProjection
Core.:> Core.QueryParam "start-token" Core.Text
Core.:> Core.QueryParam "alt" Core.AltJSON
Core.:> Core.Get '[Core.JSON] UrlHistory
data URLShortenerUrlList = URLShortenerUrlList
{
URLShortenerUrlList -> Maybe UrlListProjection
projection :: (Core.Maybe UrlListProjection),
URLShortenerUrlList -> Maybe Text
startToken :: (Core.Maybe Core.Text)
}
deriving (URLShortenerUrlList -> URLShortenerUrlList -> Bool
(URLShortenerUrlList -> URLShortenerUrlList -> Bool)
-> (URLShortenerUrlList -> URLShortenerUrlList -> Bool)
-> Eq URLShortenerUrlList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: URLShortenerUrlList -> URLShortenerUrlList -> Bool
== :: URLShortenerUrlList -> URLShortenerUrlList -> Bool
$c/= :: URLShortenerUrlList -> URLShortenerUrlList -> Bool
/= :: URLShortenerUrlList -> URLShortenerUrlList -> Bool
Core.Eq, Int -> URLShortenerUrlList -> ShowS
[URLShortenerUrlList] -> ShowS
URLShortenerUrlList -> String
(Int -> URLShortenerUrlList -> ShowS)
-> (URLShortenerUrlList -> String)
-> ([URLShortenerUrlList] -> ShowS)
-> Show URLShortenerUrlList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> URLShortenerUrlList -> ShowS
showsPrec :: Int -> URLShortenerUrlList -> ShowS
$cshow :: URLShortenerUrlList -> String
show :: URLShortenerUrlList -> String
$cshowList :: [URLShortenerUrlList] -> ShowS
showList :: [URLShortenerUrlList] -> ShowS
Core.Show, (forall x. URLShortenerUrlList -> Rep URLShortenerUrlList x)
-> (forall x. Rep URLShortenerUrlList x -> URLShortenerUrlList)
-> Generic URLShortenerUrlList
forall x. Rep URLShortenerUrlList x -> URLShortenerUrlList
forall x. URLShortenerUrlList -> Rep URLShortenerUrlList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. URLShortenerUrlList -> Rep URLShortenerUrlList x
from :: forall x. URLShortenerUrlList -> Rep URLShortenerUrlList x
$cto :: forall x. Rep URLShortenerUrlList x -> URLShortenerUrlList
to :: forall x. Rep URLShortenerUrlList x -> URLShortenerUrlList
Core.Generic)
newURLShortenerUrlList ::
URLShortenerUrlList
newURLShortenerUrlList :: URLShortenerUrlList
newURLShortenerUrlList =
URLShortenerUrlList
{ projection :: Maybe UrlListProjection
projection = Maybe UrlListProjection
forall a. Maybe a
Core.Nothing,
startToken :: Maybe Text
startToken = Maybe Text
forall a. Maybe a
Core.Nothing
}
instance Core.GoogleRequest URLShortenerUrlList where
type Rs URLShortenerUrlList = UrlHistory
type Scopes URLShortenerUrlList = '[Urlshortener'FullControl]
requestClient :: URLShortenerUrlList -> GClient (Rs URLShortenerUrlList)
requestClient URLShortenerUrlList {Maybe Text
Maybe UrlListProjection
projection :: URLShortenerUrlList -> Maybe UrlListProjection
startToken :: URLShortenerUrlList -> Maybe Text
projection :: Maybe UrlListProjection
startToken :: Maybe Text
..} =
Maybe UrlListProjection
-> Maybe Text
-> Maybe AltJSON
-> ServiceConfig
-> GClient UrlHistory
go
Maybe UrlListProjection
projection
Maybe Text
startToken
(AltJSON -> Maybe AltJSON
forall a. a -> Maybe a
Core.Just AltJSON
Core.AltJSON)
ServiceConfig
uRLShortenerService
where
go :: Fn URLShortenerUrlListResource
go =
Proxy URLShortenerUrlListResource
-> Request -> Fn URLShortenerUrlListResource
forall {k} (fn :: k).
GoogleClient fn =>
Proxy fn -> Request -> Fn fn
Core.buildClient
(Proxy URLShortenerUrlListResource
forall {k} (t :: k). Proxy t
Core.Proxy :: Core.Proxy URLShortenerUrlListResource)
Request
forall a. Monoid a => a
Core.mempty