{-# 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.UpdatePolicy
(
ProjectsUpdatePolicyResource
, projectsUpdatePolicy
, ProjectsUpdatePolicy
, pupXgafv
, pupUploadProtocol
, pupAccessToken
, pupUploadType
, pupPayload
, pupName
, pupCallback
) where
import Network.Google.BinaryAuthorization.Types
import Network.Google.Prelude
type ProjectsUpdatePolicyResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Policy :> Put '[JSON] Policy
data ProjectsUpdatePolicy = ProjectsUpdatePolicy'
{ _pupXgafv :: !(Maybe Xgafv)
, _pupUploadProtocol :: !(Maybe Text)
, _pupAccessToken :: !(Maybe Text)
, _pupUploadType :: !(Maybe Text)
, _pupPayload :: !Policy
, _pupName :: !Text
, _pupCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsUpdatePolicy
:: Policy
-> Text
-> ProjectsUpdatePolicy
projectsUpdatePolicy pPupPayload_ pPupName_ =
ProjectsUpdatePolicy'
{ _pupXgafv = Nothing
, _pupUploadProtocol = Nothing
, _pupAccessToken = Nothing
, _pupUploadType = Nothing
, _pupPayload = pPupPayload_
, _pupName = pPupName_
, _pupCallback = Nothing
}
pupXgafv :: Lens' ProjectsUpdatePolicy (Maybe Xgafv)
pupXgafv = lens _pupXgafv (\ s a -> s{_pupXgafv = a})
pupUploadProtocol :: Lens' ProjectsUpdatePolicy (Maybe Text)
pupUploadProtocol
= lens _pupUploadProtocol
(\ s a -> s{_pupUploadProtocol = a})
pupAccessToken :: Lens' ProjectsUpdatePolicy (Maybe Text)
pupAccessToken
= lens _pupAccessToken
(\ s a -> s{_pupAccessToken = a})
pupUploadType :: Lens' ProjectsUpdatePolicy (Maybe Text)
pupUploadType
= lens _pupUploadType
(\ s a -> s{_pupUploadType = a})
pupPayload :: Lens' ProjectsUpdatePolicy Policy
pupPayload
= lens _pupPayload (\ s a -> s{_pupPayload = a})
pupName :: Lens' ProjectsUpdatePolicy Text
pupName = lens _pupName (\ s a -> s{_pupName = a})
pupCallback :: Lens' ProjectsUpdatePolicy (Maybe Text)
pupCallback
= lens _pupCallback (\ s a -> s{_pupCallback = a})
instance GoogleRequest ProjectsUpdatePolicy where
type Rs ProjectsUpdatePolicy = Policy
type Scopes ProjectsUpdatePolicy =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsUpdatePolicy'{..}
= go _pupName _pupXgafv _pupUploadProtocol
_pupAccessToken
_pupUploadType
_pupCallback
(Just AltJSON)
_pupPayload
binaryAuthorizationService
where go
= buildClient
(Proxy :: Proxy ProjectsUpdatePolicyResource)
mempty