{-# 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.Partners.Companies.Get
(
CompaniesGetResource
, companiesGet
, CompaniesGet
, cgXgafv
, cgCurrencyCode
, cgUploadProtocol
, cgCompanyId
, cgOrderBy
, cgAccessToken
, cgUploadType
, cgAddress
, cgRequestMetadataPartnersSessionId
, cgRequestMetadataLocale
, cgView
, cgRequestMetadataExperimentIds
, cgRequestMetadataUserOverridesIPAddress
, cgRequestMetadataTrafficSourceTrafficSubId
, cgRequestMetadataUserOverridesUserId
, cgRequestMetadataTrafficSourceTrafficSourceId
, cgCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type CompaniesGetResource =
"v2" :>
"companies" :>
Capture "companyId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "currencyCode" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "orderBy" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "address" Text :>
QueryParam "requestMetadata.partnersSessionId" Text
:>
QueryParam "requestMetadata.locale" Text :>
QueryParam "view" Text :>
QueryParams "requestMetadata.experimentIds" Text
:>
QueryParam
"requestMetadata.userOverrides.ipAddress"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSubId"
Text
:>
QueryParam
"requestMetadata.userOverrides.userId"
Text
:>
QueryParam
"requestMetadata.trafficSource.trafficSourceId"
Text
:>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetCompanyResponse
data CompaniesGet = CompaniesGet'
{ _cgXgafv :: !(Maybe Xgafv)
, _cgCurrencyCode :: !(Maybe Text)
, _cgUploadProtocol :: !(Maybe Text)
, _cgCompanyId :: !Text
, _cgOrderBy :: !(Maybe Text)
, _cgAccessToken :: !(Maybe Text)
, _cgUploadType :: !(Maybe Text)
, _cgAddress :: !(Maybe Text)
, _cgRequestMetadataPartnersSessionId :: !(Maybe Text)
, _cgRequestMetadataLocale :: !(Maybe Text)
, _cgView :: !(Maybe Text)
, _cgRequestMetadataExperimentIds :: !(Maybe [Text])
, _cgRequestMetadataUserOverridesIPAddress :: !(Maybe Text)
, _cgRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text)
, _cgRequestMetadataUserOverridesUserId :: !(Maybe Text)
, _cgRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text)
, _cgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
companiesGet
:: Text
-> CompaniesGet
companiesGet pCgCompanyId_ =
CompaniesGet'
{ _cgXgafv = Nothing
, _cgCurrencyCode = Nothing
, _cgUploadProtocol = Nothing
, _cgCompanyId = pCgCompanyId_
, _cgOrderBy = Nothing
, _cgAccessToken = Nothing
, _cgUploadType = Nothing
, _cgAddress = Nothing
, _cgRequestMetadataPartnersSessionId = Nothing
, _cgRequestMetadataLocale = Nothing
, _cgView = Nothing
, _cgRequestMetadataExperimentIds = Nothing
, _cgRequestMetadataUserOverridesIPAddress = Nothing
, _cgRequestMetadataTrafficSourceTrafficSubId = Nothing
, _cgRequestMetadataUserOverridesUserId = Nothing
, _cgRequestMetadataTrafficSourceTrafficSourceId = Nothing
, _cgCallback = Nothing
}
cgXgafv :: Lens' CompaniesGet (Maybe Xgafv)
cgXgafv = lens _cgXgafv (\ s a -> s{_cgXgafv = a})
cgCurrencyCode :: Lens' CompaniesGet (Maybe Text)
cgCurrencyCode
= lens _cgCurrencyCode
(\ s a -> s{_cgCurrencyCode = a})
cgUploadProtocol :: Lens' CompaniesGet (Maybe Text)
cgUploadProtocol
= lens _cgUploadProtocol
(\ s a -> s{_cgUploadProtocol = a})
cgCompanyId :: Lens' CompaniesGet Text
cgCompanyId
= lens _cgCompanyId (\ s a -> s{_cgCompanyId = a})
cgOrderBy :: Lens' CompaniesGet (Maybe Text)
cgOrderBy
= lens _cgOrderBy (\ s a -> s{_cgOrderBy = a})
cgAccessToken :: Lens' CompaniesGet (Maybe Text)
cgAccessToken
= lens _cgAccessToken
(\ s a -> s{_cgAccessToken = a})
cgUploadType :: Lens' CompaniesGet (Maybe Text)
cgUploadType
= lens _cgUploadType (\ s a -> s{_cgUploadType = a})
cgAddress :: Lens' CompaniesGet (Maybe Text)
cgAddress
= lens _cgAddress (\ s a -> s{_cgAddress = a})
cgRequestMetadataPartnersSessionId :: Lens' CompaniesGet (Maybe Text)
cgRequestMetadataPartnersSessionId
= lens _cgRequestMetadataPartnersSessionId
(\ s a -> s{_cgRequestMetadataPartnersSessionId = a})
cgRequestMetadataLocale :: Lens' CompaniesGet (Maybe Text)
cgRequestMetadataLocale
= lens _cgRequestMetadataLocale
(\ s a -> s{_cgRequestMetadataLocale = a})
cgView :: Lens' CompaniesGet (Maybe Text)
cgView = lens _cgView (\ s a -> s{_cgView = a})
cgRequestMetadataExperimentIds :: Lens' CompaniesGet [Text]
cgRequestMetadataExperimentIds
= lens _cgRequestMetadataExperimentIds
(\ s a -> s{_cgRequestMetadataExperimentIds = a})
. _Default
. _Coerce
cgRequestMetadataUserOverridesIPAddress :: Lens' CompaniesGet (Maybe Text)
cgRequestMetadataUserOverridesIPAddress
= lens _cgRequestMetadataUserOverridesIPAddress
(\ s a ->
s{_cgRequestMetadataUserOverridesIPAddress = a})
cgRequestMetadataTrafficSourceTrafficSubId :: Lens' CompaniesGet (Maybe Text)
cgRequestMetadataTrafficSourceTrafficSubId
= lens _cgRequestMetadataTrafficSourceTrafficSubId
(\ s a ->
s{_cgRequestMetadataTrafficSourceTrafficSubId = a})
cgRequestMetadataUserOverridesUserId :: Lens' CompaniesGet (Maybe Text)
cgRequestMetadataUserOverridesUserId
= lens _cgRequestMetadataUserOverridesUserId
(\ s a ->
s{_cgRequestMetadataUserOverridesUserId = a})
cgRequestMetadataTrafficSourceTrafficSourceId :: Lens' CompaniesGet (Maybe Text)
cgRequestMetadataTrafficSourceTrafficSourceId
= lens _cgRequestMetadataTrafficSourceTrafficSourceId
(\ s a ->
s{_cgRequestMetadataTrafficSourceTrafficSourceId =
a})
cgCallback :: Lens' CompaniesGet (Maybe Text)
cgCallback
= lens _cgCallback (\ s a -> s{_cgCallback = a})
instance GoogleRequest CompaniesGet where
type Rs CompaniesGet = GetCompanyResponse
type Scopes CompaniesGet = '[]
requestClient CompaniesGet'{..}
= go _cgCompanyId _cgXgafv _cgCurrencyCode
_cgUploadProtocol
_cgOrderBy
_cgAccessToken
_cgUploadType
_cgAddress
_cgRequestMetadataPartnersSessionId
_cgRequestMetadataLocale
_cgView
(_cgRequestMetadataExperimentIds ^. _Default)
_cgRequestMetadataUserOverridesIPAddress
_cgRequestMetadataTrafficSourceTrafficSubId
_cgRequestMetadataUserOverridesUserId
_cgRequestMetadataTrafficSourceTrafficSourceId
_cgCallback
(Just AltJSON)
partnersService
where go
= buildClient (Proxy :: Proxy CompaniesGetResource)
mempty