{-# 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.AndroidEnterprise.Storelayoutclusters.Insert
(
StorelayoutclustersInsertResource
, storelayoutclustersInsert
, StorelayoutclustersInsert
, sEnterpriseId
, sPageId
, sPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type StorelayoutclustersInsertResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"storeLayout" :>
"pages" :>
Capture "pageId" Text :>
"clusters" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StoreCluster :>
Post '[JSON] StoreCluster
data StorelayoutclustersInsert = StorelayoutclustersInsert'
{ _sEnterpriseId :: !Text
, _sPageId :: !Text
, _sPayload :: !StoreCluster
} deriving (Eq,Show,Data,Typeable,Generic)
storelayoutclustersInsert
:: Text
-> Text
-> StoreCluster
-> StorelayoutclustersInsert
storelayoutclustersInsert pSEnterpriseId_ pSPageId_ pSPayload_ =
StorelayoutclustersInsert'
{ _sEnterpriseId = pSEnterpriseId_
, _sPageId = pSPageId_
, _sPayload = pSPayload_
}
sEnterpriseId :: Lens' StorelayoutclustersInsert Text
sEnterpriseId
= lens _sEnterpriseId
(\ s a -> s{_sEnterpriseId = a})
sPageId :: Lens' StorelayoutclustersInsert Text
sPageId = lens _sPageId (\ s a -> s{_sPageId = a})
sPayload :: Lens' StorelayoutclustersInsert StoreCluster
sPayload = lens _sPayload (\ s a -> s{_sPayload = a})
instance GoogleRequest StorelayoutclustersInsert
where
type Rs StorelayoutclustersInsert = StoreCluster
type Scopes StorelayoutclustersInsert =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient StorelayoutclustersInsert'{..}
= go _sEnterpriseId _sPageId (Just AltJSON) _sPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy StorelayoutclustersInsertResource)
mempty