{-# 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.Storelayoutpages.Insert
(
StorelayoutpagesInsertResource
, storelayoutpagesInsert
, StorelayoutpagesInsert
, siEnterpriseId
, siPayload
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type StorelayoutpagesInsertResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"storeLayout" :>
"pages" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] StorePage :> Post '[JSON] StorePage
data StorelayoutpagesInsert = StorelayoutpagesInsert'
{ _siEnterpriseId :: !Text
, _siPayload :: !StorePage
} deriving (Eq,Show,Data,Typeable,Generic)
storelayoutpagesInsert
:: Text
-> StorePage
-> StorelayoutpagesInsert
storelayoutpagesInsert pSiEnterpriseId_ pSiPayload_ =
StorelayoutpagesInsert'
{ _siEnterpriseId = pSiEnterpriseId_
, _siPayload = pSiPayload_
}
siEnterpriseId :: Lens' StorelayoutpagesInsert Text
siEnterpriseId
= lens _siEnterpriseId
(\ s a -> s{_siEnterpriseId = a})
siPayload :: Lens' StorelayoutpagesInsert StorePage
siPayload
= lens _siPayload (\ s a -> s{_siPayload = a})
instance GoogleRequest StorelayoutpagesInsert where
type Rs StorelayoutpagesInsert = StorePage
type Scopes StorelayoutpagesInsert =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient StorelayoutpagesInsert'{..}
= go _siEnterpriseId (Just AltJSON) _siPayload
androidEnterpriseService
where go
= buildClient
(Proxy :: Proxy StorelayoutpagesInsertResource)
mempty