{-# 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.AndroidDeviceProvisioning.Customers.Configurations.Create
(
CustomersConfigurationsCreateResource
, customersConfigurationsCreate
, CustomersConfigurationsCreate
, cccParent
, cccXgafv
, cccUploadProtocol
, cccAccessToken
, cccUploadType
, cccPayload
, cccCallback
) where
import Network.Google.AndroidDeviceProvisioning.Types
import Network.Google.Prelude
type CustomersConfigurationsCreateResource =
"v1" :>
Capture "parent" Text :>
"configurations" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Configuration :>
Post '[JSON] Configuration
data CustomersConfigurationsCreate = CustomersConfigurationsCreate'
{ _cccParent :: !Text
, _cccXgafv :: !(Maybe Xgafv)
, _cccUploadProtocol :: !(Maybe Text)
, _cccAccessToken :: !(Maybe Text)
, _cccUploadType :: !(Maybe Text)
, _cccPayload :: !Configuration
, _cccCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customersConfigurationsCreate
:: Text
-> Configuration
-> CustomersConfigurationsCreate
customersConfigurationsCreate pCccParent_ pCccPayload_ =
CustomersConfigurationsCreate'
{ _cccParent = pCccParent_
, _cccXgafv = Nothing
, _cccUploadProtocol = Nothing
, _cccAccessToken = Nothing
, _cccUploadType = Nothing
, _cccPayload = pCccPayload_
, _cccCallback = Nothing
}
cccParent :: Lens' CustomersConfigurationsCreate Text
cccParent
= lens _cccParent (\ s a -> s{_cccParent = a})
cccXgafv :: Lens' CustomersConfigurationsCreate (Maybe Xgafv)
cccXgafv = lens _cccXgafv (\ s a -> s{_cccXgafv = a})
cccUploadProtocol :: Lens' CustomersConfigurationsCreate (Maybe Text)
cccUploadProtocol
= lens _cccUploadProtocol
(\ s a -> s{_cccUploadProtocol = a})
cccAccessToken :: Lens' CustomersConfigurationsCreate (Maybe Text)
cccAccessToken
= lens _cccAccessToken
(\ s a -> s{_cccAccessToken = a})
cccUploadType :: Lens' CustomersConfigurationsCreate (Maybe Text)
cccUploadType
= lens _cccUploadType
(\ s a -> s{_cccUploadType = a})
cccPayload :: Lens' CustomersConfigurationsCreate Configuration
cccPayload
= lens _cccPayload (\ s a -> s{_cccPayload = a})
cccCallback :: Lens' CustomersConfigurationsCreate (Maybe Text)
cccCallback
= lens _cccCallback (\ s a -> s{_cccCallback = a})
instance GoogleRequest CustomersConfigurationsCreate
where
type Rs CustomersConfigurationsCreate = Configuration
type Scopes CustomersConfigurationsCreate = '[]
requestClient CustomersConfigurationsCreate'{..}
= go _cccParent _cccXgafv _cccUploadProtocol
_cccAccessToken
_cccUploadType
_cccCallback
(Just AltJSON)
_cccPayload
androidDeviceProvisioningService
where go
= buildClient
(Proxy ::
Proxy CustomersConfigurationsCreateResource)
mempty