{-# 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.ServiceConsumerManagement.Services.Search
(
ServicesSearchResource
, servicesSearch
, ServicesSearch
, ssParent
, ssXgafv
, ssUploadProtocol
, ssAccessToken
, ssUploadType
, ssQuery
, ssPageToken
, ssPageSize
, ssCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceConsumerManagement.Types
type ServicesSearchResource =
"v1" :>
CaptureMode "parent" "search" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "query" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] SearchTenancyUnitsResponse
data ServicesSearch = ServicesSearch'
{ _ssParent :: !Text
, _ssXgafv :: !(Maybe Xgafv)
, _ssUploadProtocol :: !(Maybe Text)
, _ssAccessToken :: !(Maybe Text)
, _ssUploadType :: !(Maybe Text)
, _ssQuery :: !(Maybe Text)
, _ssPageToken :: !(Maybe Text)
, _ssPageSize :: !(Maybe (Textual Int32))
, _ssCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesSearch
:: Text
-> ServicesSearch
servicesSearch pSsParent_ =
ServicesSearch'
{ _ssParent = pSsParent_
, _ssXgafv = Nothing
, _ssUploadProtocol = Nothing
, _ssAccessToken = Nothing
, _ssUploadType = Nothing
, _ssQuery = Nothing
, _ssPageToken = Nothing
, _ssPageSize = Nothing
, _ssCallback = Nothing
}
ssParent :: Lens' ServicesSearch Text
ssParent = lens _ssParent (\ s a -> s{_ssParent = a})
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})
ssQuery :: Lens' ServicesSearch (Maybe Text)
ssQuery = lens _ssQuery (\ s a -> s{_ssQuery = 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 = SearchTenancyUnitsResponse
type Scopes ServicesSearch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ServicesSearch'{..}
= go _ssParent _ssXgafv _ssUploadProtocol
_ssAccessToken
_ssUploadType
_ssQuery
_ssPageToken
_ssPageSize
_ssCallback
(Just AltJSON)
serviceConsumerManagementService
where go
= buildClient (Proxy :: Proxy ServicesSearchResource)
mempty