{-# 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.Composer.Projects.Locations.Environments.Create
(
ProjectsLocationsEnvironmentsCreateResource
, projectsLocationsEnvironmentsCreate
, ProjectsLocationsEnvironmentsCreate
, plecParent
, plecXgafv
, plecUploadProtocol
, plecAccessToken
, plecUploadType
, plecPayload
, plecCallback
) where
import Network.Google.Composer.Types
import Network.Google.Prelude
type ProjectsLocationsEnvironmentsCreateResource =
"v1" :>
Capture "parent" Text :>
"environments" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Environment :> Post '[JSON] Operation
data ProjectsLocationsEnvironmentsCreate = ProjectsLocationsEnvironmentsCreate'
{ _plecParent :: !Text
, _plecXgafv :: !(Maybe Xgafv)
, _plecUploadProtocol :: !(Maybe Text)
, _plecAccessToken :: !(Maybe Text)
, _plecUploadType :: !(Maybe Text)
, _plecPayload :: !Environment
, _plecCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsEnvironmentsCreate
:: Text
-> Environment
-> ProjectsLocationsEnvironmentsCreate
projectsLocationsEnvironmentsCreate pPlecParent_ pPlecPayload_ =
ProjectsLocationsEnvironmentsCreate'
{ _plecParent = pPlecParent_
, _plecXgafv = Nothing
, _plecUploadProtocol = Nothing
, _plecAccessToken = Nothing
, _plecUploadType = Nothing
, _plecPayload = pPlecPayload_
, _plecCallback = Nothing
}
plecParent :: Lens' ProjectsLocationsEnvironmentsCreate Text
plecParent
= lens _plecParent (\ s a -> s{_plecParent = a})
plecXgafv :: Lens' ProjectsLocationsEnvironmentsCreate (Maybe Xgafv)
plecXgafv
= lens _plecXgafv (\ s a -> s{_plecXgafv = a})
plecUploadProtocol :: Lens' ProjectsLocationsEnvironmentsCreate (Maybe Text)
plecUploadProtocol
= lens _plecUploadProtocol
(\ s a -> s{_plecUploadProtocol = a})
plecAccessToken :: Lens' ProjectsLocationsEnvironmentsCreate (Maybe Text)
plecAccessToken
= lens _plecAccessToken
(\ s a -> s{_plecAccessToken = a})
plecUploadType :: Lens' ProjectsLocationsEnvironmentsCreate (Maybe Text)
plecUploadType
= lens _plecUploadType
(\ s a -> s{_plecUploadType = a})
plecPayload :: Lens' ProjectsLocationsEnvironmentsCreate Environment
plecPayload
= lens _plecPayload (\ s a -> s{_plecPayload = a})
plecCallback :: Lens' ProjectsLocationsEnvironmentsCreate (Maybe Text)
plecCallback
= lens _plecCallback (\ s a -> s{_plecCallback = a})
instance GoogleRequest
ProjectsLocationsEnvironmentsCreate where
type Rs ProjectsLocationsEnvironmentsCreate =
Operation
type Scopes ProjectsLocationsEnvironmentsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient
ProjectsLocationsEnvironmentsCreate'{..}
= go _plecParent _plecXgafv _plecUploadProtocol
_plecAccessToken
_plecUploadType
_plecCallback
(Just AltJSON)
_plecPayload
composerService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsEnvironmentsCreateResource)
mempty