{-# 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.Monitoring.Projects.Groups.Create
(
ProjectsGroupsCreateResource
, projectsGroupsCreate
, ProjectsGroupsCreate
, pgcXgafv
, pgcValidateOnly
, pgcUploadProtocol
, pgcAccessToken
, pgcUploadType
, pgcPayload
, pgcName
, pgcCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsGroupsCreateResource =
"v3" :>
Capture "name" Text :>
"groups" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "validateOnly" Bool :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Group :> Post '[JSON] Group
data ProjectsGroupsCreate = ProjectsGroupsCreate'
{ _pgcXgafv :: !(Maybe Xgafv)
, _pgcValidateOnly :: !(Maybe Bool)
, _pgcUploadProtocol :: !(Maybe Text)
, _pgcAccessToken :: !(Maybe Text)
, _pgcUploadType :: !(Maybe Text)
, _pgcPayload :: !Group
, _pgcName :: !Text
, _pgcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGroupsCreate
:: Group
-> Text
-> ProjectsGroupsCreate
projectsGroupsCreate pPgcPayload_ pPgcName_ =
ProjectsGroupsCreate'
{ _pgcXgafv = Nothing
, _pgcValidateOnly = Nothing
, _pgcUploadProtocol = Nothing
, _pgcAccessToken = Nothing
, _pgcUploadType = Nothing
, _pgcPayload = pPgcPayload_
, _pgcName = pPgcName_
, _pgcCallback = Nothing
}
pgcXgafv :: Lens' ProjectsGroupsCreate (Maybe Xgafv)
pgcXgafv = lens _pgcXgafv (\ s a -> s{_pgcXgafv = a})
pgcValidateOnly :: Lens' ProjectsGroupsCreate (Maybe Bool)
pgcValidateOnly
= lens _pgcValidateOnly
(\ s a -> s{_pgcValidateOnly = a})
pgcUploadProtocol :: Lens' ProjectsGroupsCreate (Maybe Text)
pgcUploadProtocol
= lens _pgcUploadProtocol
(\ s a -> s{_pgcUploadProtocol = a})
pgcAccessToken :: Lens' ProjectsGroupsCreate (Maybe Text)
pgcAccessToken
= lens _pgcAccessToken
(\ s a -> s{_pgcAccessToken = a})
pgcUploadType :: Lens' ProjectsGroupsCreate (Maybe Text)
pgcUploadType
= lens _pgcUploadType
(\ s a -> s{_pgcUploadType = a})
pgcPayload :: Lens' ProjectsGroupsCreate Group
pgcPayload
= lens _pgcPayload (\ s a -> s{_pgcPayload = a})
pgcName :: Lens' ProjectsGroupsCreate Text
pgcName = lens _pgcName (\ s a -> s{_pgcName = a})
pgcCallback :: Lens' ProjectsGroupsCreate (Maybe Text)
pgcCallback
= lens _pgcCallback (\ s a -> s{_pgcCallback = a})
instance GoogleRequest ProjectsGroupsCreate where
type Rs ProjectsGroupsCreate = Group
type Scopes ProjectsGroupsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsGroupsCreate'{..}
= go _pgcName _pgcXgafv _pgcValidateOnly
_pgcUploadProtocol
_pgcAccessToken
_pgcUploadType
_pgcCallback
(Just AltJSON)
_pgcPayload
monitoringService
where go
= buildClient
(Proxy :: Proxy ProjectsGroupsCreateResource)
mempty