{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.ServiceUser.Services.Search
(
ServicesSearchResource
, servicesSearch
, ServicesSearch
, ssXgafv
, ssUploadProtocol
, ssAccessToken
, ssUploadType
, ssPageToken
, ssPageSize
, ssCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUser.Types
type ServicesSearchResource =
"v1" :>
"services:search" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] SearchServicesResponse
data ServicesSearch = ServicesSearch'
{ _ssXgafv :: !(Maybe Xgafv)
, _ssUploadProtocol :: !(Maybe Text)
, _ssAccessToken :: !(Maybe Text)
, _ssUploadType :: !(Maybe Text)
, _ssPageToken :: !(Maybe Text)
, _ssPageSize :: !(Maybe (Textual Int32))
, _ssCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesSearch
:: ServicesSearch
servicesSearch =
ServicesSearch'
{ _ssXgafv = Nothing
, _ssUploadProtocol = Nothing
, _ssAccessToken = Nothing
, _ssUploadType = Nothing
, _ssPageToken = Nothing
, _ssPageSize = Nothing
, _ssCallback = Nothing
}
ssXgafv :: Lens' ServicesSearch (Maybe Xgafv)
ssXgafv = lens _ssXgafv (\ s a -> s{_ssXgafv = a})
ssUploadProtocol :: Lens' ServicesSearch (Maybe Text)
ssUploadProtocol
= lens _ssUploadProtocol
(\ s a -> s{_ssUploadProtocol = a})
ssAccessToken :: Lens' ServicesSearch (Maybe Text)
ssAccessToken
= lens _ssAccessToken
(\ s a -> s{_ssAccessToken = a})
ssUploadType :: Lens' ServicesSearch (Maybe Text)
ssUploadType
= lens _ssUploadType (\ s a -> s{_ssUploadType = a})
ssPageToken :: Lens' ServicesSearch (Maybe Text)
ssPageToken
= lens _ssPageToken (\ s a -> s{_ssPageToken = a})
ssPageSize :: Lens' ServicesSearch (Maybe Int32)
ssPageSize
= lens _ssPageSize (\ s a -> s{_ssPageSize = a}) .
mapping _Coerce
ssCallback :: Lens' ServicesSearch (Maybe Text)
ssCallback
= lens _ssCallback (\ s a -> s{_ssCallback = a})
instance GoogleRequest ServicesSearch where
type Rs ServicesSearch = SearchServicesResponse
type Scopes ServicesSearch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient ServicesSearch'{..}
= go _ssXgafv _ssUploadProtocol _ssAccessToken
_ssUploadType
_ssPageToken
_ssPageSize
_ssCallback
(Just AltJSON)
serviceUserService
where go
= buildClient (Proxy :: Proxy ServicesSearchResource)
mempty