{-# 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.Storage.Projects.HmacKeys.List
(
ProjectsHmacKeysListResource
, projectsHmacKeysList
, ProjectsHmacKeysList
, phklShowDeletedKeys
, phklServiceAccountEmail
, phklPageToken
, phklProjectId
, phklMaxResults
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type ProjectsHmacKeysListResource =
"storage" :>
"v1" :>
"projects" :>
Capture "projectId" Text :>
"hmacKeys" :>
QueryParam "showDeletedKeys" Bool :>
QueryParam "serviceAccountEmail" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] HmacKeysMetadata
data ProjectsHmacKeysList =
ProjectsHmacKeysList'
{ _phklShowDeletedKeys :: !(Maybe Bool)
, _phklServiceAccountEmail :: !(Maybe Text)
, _phklPageToken :: !(Maybe Text)
, _phklProjectId :: !Text
, _phklMaxResults :: !(Textual Word32)
}
deriving (Eq, Show, Data, Typeable, Generic)
projectsHmacKeysList
:: Text
-> ProjectsHmacKeysList
projectsHmacKeysList pPhklProjectId_ =
ProjectsHmacKeysList'
{ _phklShowDeletedKeys = Nothing
, _phklServiceAccountEmail = Nothing
, _phklPageToken = Nothing
, _phklProjectId = pPhklProjectId_
, _phklMaxResults = 1000
}
phklShowDeletedKeys :: Lens' ProjectsHmacKeysList (Maybe Bool)
phklShowDeletedKeys
= lens _phklShowDeletedKeys
(\ s a -> s{_phklShowDeletedKeys = a})
phklServiceAccountEmail :: Lens' ProjectsHmacKeysList (Maybe Text)
phklServiceAccountEmail
= lens _phklServiceAccountEmail
(\ s a -> s{_phklServiceAccountEmail = a})
phklPageToken :: Lens' ProjectsHmacKeysList (Maybe Text)
phklPageToken
= lens _phklPageToken
(\ s a -> s{_phklPageToken = a})
phklProjectId :: Lens' ProjectsHmacKeysList Text
phklProjectId
= lens _phklProjectId
(\ s a -> s{_phklProjectId = a})
phklMaxResults :: Lens' ProjectsHmacKeysList Word32
phklMaxResults
= lens _phklMaxResults
(\ s a -> s{_phklMaxResults = a})
. _Coerce
instance GoogleRequest ProjectsHmacKeysList where
type Rs ProjectsHmacKeysList = HmacKeysMetadata
type Scopes ProjectsHmacKeysList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only"]
requestClient ProjectsHmacKeysList'{..}
= go _phklProjectId _phklShowDeletedKeys
_phklServiceAccountEmail
_phklPageToken
(Just _phklMaxResults)
(Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy ProjectsHmacKeysListResource)
mempty