{-# 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.Users.CreateCompanyRelation
(
UsersCreateCompanyRelationResource
, usersCreateCompanyRelation
, UsersCreateCompanyRelation
, uccrXgafv
, uccrUploadProtocol
, uccrAccessToken
, uccrUploadType
, uccrPayload
, uccrUserId
, uccrRequestMetadataPartnersSessionId
, uccrRequestMetadataLocale
, uccrRequestMetadataExperimentIds
, uccrRequestMetadataUserOverridesIPAddress
, uccrRequestMetadataTrafficSourceTrafficSubId
, uccrRequestMetadataUserOverridesUserId
, uccrRequestMetadataTrafficSourceTrafficSourceId
, uccrCallback
) where
import Network.Google.Partners.Types
import Network.Google.Prelude
type UsersCreateCompanyRelationResource =
"v2" :>
"users" :>
Capture "userId" Text :>
"companyRelation" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "requestMetadata.partnersSessionId" Text
:>
QueryParam "requestMetadata.locale" 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 :>
ReqBody '[JSON] CompanyRelation :>
Put '[JSON] CompanyRelation
data UsersCreateCompanyRelation = UsersCreateCompanyRelation'
{ _uccrXgafv :: !(Maybe Xgafv)
, _uccrUploadProtocol :: !(Maybe Text)
, _uccrAccessToken :: !(Maybe Text)
, _uccrUploadType :: !(Maybe Text)
, _uccrPayload :: !CompanyRelation
, _uccrUserId :: !Text
, _uccrRequestMetadataPartnersSessionId :: !(Maybe Text)
, _uccrRequestMetadataLocale :: !(Maybe Text)
, _uccrRequestMetadataExperimentIds :: !(Maybe [Text])
, _uccrRequestMetadataUserOverridesIPAddress :: !(Maybe Text)
, _uccrRequestMetadataTrafficSourceTrafficSubId :: !(Maybe Text)
, _uccrRequestMetadataUserOverridesUserId :: !(Maybe Text)
, _uccrRequestMetadataTrafficSourceTrafficSourceId :: !(Maybe Text)
, _uccrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
usersCreateCompanyRelation
:: CompanyRelation
-> Text
-> UsersCreateCompanyRelation
usersCreateCompanyRelation pUccrPayload_ pUccrUserId_ =
UsersCreateCompanyRelation'
{ _uccrXgafv = Nothing
, _uccrUploadProtocol = Nothing
, _uccrAccessToken = Nothing
, _uccrUploadType = Nothing
, _uccrPayload = pUccrPayload_
, _uccrUserId = pUccrUserId_
, _uccrRequestMetadataPartnersSessionId = Nothing
, _uccrRequestMetadataLocale = Nothing
, _uccrRequestMetadataExperimentIds = Nothing
, _uccrRequestMetadataUserOverridesIPAddress = Nothing
, _uccrRequestMetadataTrafficSourceTrafficSubId = Nothing
, _uccrRequestMetadataUserOverridesUserId = Nothing
, _uccrRequestMetadataTrafficSourceTrafficSourceId = Nothing
, _uccrCallback = Nothing
}
uccrXgafv :: Lens' UsersCreateCompanyRelation (Maybe Xgafv)
uccrXgafv
= lens _uccrXgafv (\ s a -> s{_uccrXgafv = a})
uccrUploadProtocol :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrUploadProtocol
= lens _uccrUploadProtocol
(\ s a -> s{_uccrUploadProtocol = a})
uccrAccessToken :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrAccessToken
= lens _uccrAccessToken
(\ s a -> s{_uccrAccessToken = a})
uccrUploadType :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrUploadType
= lens _uccrUploadType
(\ s a -> s{_uccrUploadType = a})
uccrPayload :: Lens' UsersCreateCompanyRelation CompanyRelation
uccrPayload
= lens _uccrPayload (\ s a -> s{_uccrPayload = a})
uccrUserId :: Lens' UsersCreateCompanyRelation Text
uccrUserId
= lens _uccrUserId (\ s a -> s{_uccrUserId = a})
uccrRequestMetadataPartnersSessionId :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrRequestMetadataPartnersSessionId
= lens _uccrRequestMetadataPartnersSessionId
(\ s a ->
s{_uccrRequestMetadataPartnersSessionId = a})
uccrRequestMetadataLocale :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrRequestMetadataLocale
= lens _uccrRequestMetadataLocale
(\ s a -> s{_uccrRequestMetadataLocale = a})
uccrRequestMetadataExperimentIds :: Lens' UsersCreateCompanyRelation [Text]
uccrRequestMetadataExperimentIds
= lens _uccrRequestMetadataExperimentIds
(\ s a -> s{_uccrRequestMetadataExperimentIds = a})
. _Default
. _Coerce
uccrRequestMetadataUserOverridesIPAddress :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrRequestMetadataUserOverridesIPAddress
= lens _uccrRequestMetadataUserOverridesIPAddress
(\ s a ->
s{_uccrRequestMetadataUserOverridesIPAddress = a})
uccrRequestMetadataTrafficSourceTrafficSubId :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrRequestMetadataTrafficSourceTrafficSubId
= lens _uccrRequestMetadataTrafficSourceTrafficSubId
(\ s a ->
s{_uccrRequestMetadataTrafficSourceTrafficSubId = a})
uccrRequestMetadataUserOverridesUserId :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrRequestMetadataUserOverridesUserId
= lens _uccrRequestMetadataUserOverridesUserId
(\ s a ->
s{_uccrRequestMetadataUserOverridesUserId = a})
uccrRequestMetadataTrafficSourceTrafficSourceId :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrRequestMetadataTrafficSourceTrafficSourceId
= lens
_uccrRequestMetadataTrafficSourceTrafficSourceId
(\ s a ->
s{_uccrRequestMetadataTrafficSourceTrafficSourceId =
a})
uccrCallback :: Lens' UsersCreateCompanyRelation (Maybe Text)
uccrCallback
= lens _uccrCallback (\ s a -> s{_uccrCallback = a})
instance GoogleRequest UsersCreateCompanyRelation
where
type Rs UsersCreateCompanyRelation = CompanyRelation
type Scopes UsersCreateCompanyRelation = '[]
requestClient UsersCreateCompanyRelation'{..}
= go _uccrUserId _uccrXgafv _uccrUploadProtocol
_uccrAccessToken
_uccrUploadType
_uccrRequestMetadataPartnersSessionId
_uccrRequestMetadataLocale
(_uccrRequestMetadataExperimentIds ^. _Default)
_uccrRequestMetadataUserOverridesIPAddress
_uccrRequestMetadataTrafficSourceTrafficSubId
_uccrRequestMetadataUserOverridesUserId
_uccrRequestMetadataTrafficSourceTrafficSourceId
_uccrCallback
(Just AltJSON)
_uccrPayload
partnersService
where go
= buildClient
(Proxy :: Proxy UsersCreateCompanyRelationResource)
mempty