{-# 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.BinaryAuthorization.Projects.Attestors.Create
(
ProjectsAttestorsCreateResource
, projectsAttestorsCreate
, ProjectsAttestorsCreate
, pacParent
, pacXgafv
, pacUploadProtocol
, pacAccessToken
, pacUploadType
, pacPayload
, pacAttestorId
, pacCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsAttestorsCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"attestors" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "attestorId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Attestor :> Post '[JSON] Attestor
data ProjectsAttestorsCreate = ProjectsAttestorsCreate'
{ _pacParent :: !Text
, _pacXgafv :: !(Maybe Xgafv)
, _pacUploadProtocol :: !(Maybe Text)
, _pacAccessToken :: !(Maybe Text)
, _pacUploadType :: !(Maybe Text)
, _pacPayload :: !Attestor
, _pacAttestorId :: !(Maybe Text)
, _pacCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAttestorsCreate
:: Text
-> Attestor
-> ProjectsAttestorsCreate
projectsAttestorsCreate pPacParent_ pPacPayload_ =
ProjectsAttestorsCreate'
{ _pacParent = pPacParent_
, _pacXgafv = Nothing
, _pacUploadProtocol = Nothing
, _pacAccessToken = Nothing
, _pacUploadType = Nothing
, _pacPayload = pPacPayload_
, _pacAttestorId = Nothing
, _pacCallback = Nothing
}
pacParent :: Lens' ProjectsAttestorsCreate Text
pacParent
= lens _pacParent (\ s a -> s{_pacParent = a})
pacXgafv :: Lens' ProjectsAttestorsCreate (Maybe Xgafv)
pacXgafv = lens _pacXgafv (\ s a -> s{_pacXgafv = a})
pacUploadProtocol :: Lens' ProjectsAttestorsCreate (Maybe Text)
pacUploadProtocol
= lens _pacUploadProtocol
(\ s a -> s{_pacUploadProtocol = a})
pacAccessToken :: Lens' ProjectsAttestorsCreate (Maybe Text)
pacAccessToken
= lens _pacAccessToken
(\ s a -> s{_pacAccessToken = a})
pacUploadType :: Lens' ProjectsAttestorsCreate (Maybe Text)
pacUploadType
= lens _pacUploadType
(\ s a -> s{_pacUploadType = a})
pacPayload :: Lens' ProjectsAttestorsCreate Attestor
pacPayload
= lens _pacPayload (\ s a -> s{_pacPayload = a})
pacAttestorId :: Lens' ProjectsAttestorsCreate (Maybe Text)
pacAttestorId
= lens _pacAttestorId
(\ s a -> s{_pacAttestorId = a})
pacCallback :: Lens' ProjectsAttestorsCreate (Maybe Text)
pacCallback
= lens _pacCallback (\ s a -> s{_pacCallback = a})
instance GoogleRequest ProjectsAttestorsCreate where
type Rs ProjectsAttestorsCreate = Attestor
type Scopes ProjectsAttestorsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsAttestorsCreate'{..}
= go _pacParent _pacXgafv _pacUploadProtocol
_pacAccessToken
_pacUploadType
_pacAttestorId
_pacCallback
(Just AltJSON)
_pacPayload
binaryAuthorizationService
where go
= buildClient
(Proxy :: Proxy ProjectsAttestorsCreateResource)
mempty