{-# 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.AppEngine.Apps.DomainMAppings.Create
(
AppsDomainMAppingsCreateResource
, appsDomainMAppingsCreate
, AppsDomainMAppingsCreate
, admacXgafv
, admacUploadProtocol
, admacAccessToken
, admacUploadType
, admacPayload
, admacOverrideStrategy
, admacAppsId
, admacCallback
) where
import Network.Google.AppEngine.Types
import Network.Google.Prelude
type AppsDomainMAppingsCreateResource =
"v1" :>
"apps" :>
Capture "appsId" Text :>
"domainMappings" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "overrideStrategy" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DomainMApping :>
Post '[JSON] Operation
data AppsDomainMAppingsCreate = AppsDomainMAppingsCreate'
{ _admacXgafv :: !(Maybe Xgafv)
, _admacUploadProtocol :: !(Maybe Text)
, _admacAccessToken :: !(Maybe Text)
, _admacUploadType :: !(Maybe Text)
, _admacPayload :: !DomainMApping
, _admacOverrideStrategy :: !(Maybe Text)
, _admacAppsId :: !Text
, _admacCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
appsDomainMAppingsCreate
:: DomainMApping
-> Text
-> AppsDomainMAppingsCreate
appsDomainMAppingsCreate pAdmacPayload_ pAdmacAppsId_ =
AppsDomainMAppingsCreate'
{ _admacXgafv = Nothing
, _admacUploadProtocol = Nothing
, _admacAccessToken = Nothing
, _admacUploadType = Nothing
, _admacPayload = pAdmacPayload_
, _admacOverrideStrategy = Nothing
, _admacAppsId = pAdmacAppsId_
, _admacCallback = Nothing
}
admacXgafv :: Lens' AppsDomainMAppingsCreate (Maybe Xgafv)
admacXgafv
= lens _admacXgafv (\ s a -> s{_admacXgafv = a})
admacUploadProtocol :: Lens' AppsDomainMAppingsCreate (Maybe Text)
admacUploadProtocol
= lens _admacUploadProtocol
(\ s a -> s{_admacUploadProtocol = a})
admacAccessToken :: Lens' AppsDomainMAppingsCreate (Maybe Text)
admacAccessToken
= lens _admacAccessToken
(\ s a -> s{_admacAccessToken = a})
admacUploadType :: Lens' AppsDomainMAppingsCreate (Maybe Text)
admacUploadType
= lens _admacUploadType
(\ s a -> s{_admacUploadType = a})
admacPayload :: Lens' AppsDomainMAppingsCreate DomainMApping
admacPayload
= lens _admacPayload (\ s a -> s{_admacPayload = a})
admacOverrideStrategy :: Lens' AppsDomainMAppingsCreate (Maybe Text)
admacOverrideStrategy
= lens _admacOverrideStrategy
(\ s a -> s{_admacOverrideStrategy = a})
admacAppsId :: Lens' AppsDomainMAppingsCreate Text
admacAppsId
= lens _admacAppsId (\ s a -> s{_admacAppsId = a})
admacCallback :: Lens' AppsDomainMAppingsCreate (Maybe Text)
admacCallback
= lens _admacCallback
(\ s a -> s{_admacCallback = a})
instance GoogleRequest AppsDomainMAppingsCreate where
type Rs AppsDomainMAppingsCreate = Operation
type Scopes AppsDomainMAppingsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient AppsDomainMAppingsCreate'{..}
= go _admacAppsId _admacXgafv _admacUploadProtocol
_admacAccessToken
_admacUploadType
_admacOverrideStrategy
_admacCallback
(Just AltJSON)
_admacPayload
appEngineService
where go
= buildClient
(Proxy :: Proxy AppsDomainMAppingsCreateResource)
mempty