module Network.Google.Resource.ResourceViews.ZoneViews.ListResources
(
ZoneViewsListResourcesResource
, zoneViewsListResources
, ZoneViewsListResources
, zvlrResourceView
, zvlrListState
, zvlrProject
, zvlrFormat
, zvlrZone
, zvlrServiceName
, zvlrPageToken
, zvlrMaxResults
) where
import Network.Google.Prelude
import Network.Google.ResourceViews.Types
type ZoneViewsListResourcesResource =
"resourceviews" :>
"v1beta2" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"resourceViews" :>
Capture "resourceView" Text :>
"resources" :>
QueryParam "listState"
ZoneViewsListResourcesListState
:>
QueryParam "format" ZoneViewsListResourcesFormat :>
QueryParam "serviceName" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ZoneViewsListResourcesResponse
data ZoneViewsListResources = ZoneViewsListResources'
{ _zvlrResourceView :: !Text
, _zvlrListState :: !ZoneViewsListResourcesListState
, _zvlrProject :: !Text
, _zvlrFormat :: !(Maybe ZoneViewsListResourcesFormat)
, _zvlrZone :: !Text
, _zvlrServiceName :: !(Maybe Text)
, _zvlrPageToken :: !(Maybe Text)
, _zvlrMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsListResources
:: Text
-> Text
-> Text
-> ZoneViewsListResources
zoneViewsListResources pZvlrResourceView_ pZvlrProject_ pZvlrZone_ =
ZoneViewsListResources'
{ _zvlrResourceView = pZvlrResourceView_
, _zvlrListState = All
, _zvlrProject = pZvlrProject_
, _zvlrFormat = Nothing
, _zvlrZone = pZvlrZone_
, _zvlrServiceName = Nothing
, _zvlrPageToken = Nothing
, _zvlrMaxResults = 5000
}
zvlrResourceView :: Lens' ZoneViewsListResources Text
zvlrResourceView
= lens _zvlrResourceView
(\ s a -> s{_zvlrResourceView = a})
zvlrListState :: Lens' ZoneViewsListResources ZoneViewsListResourcesListState
zvlrListState
= lens _zvlrListState
(\ s a -> s{_zvlrListState = a})
zvlrProject :: Lens' ZoneViewsListResources Text
zvlrProject
= lens _zvlrProject (\ s a -> s{_zvlrProject = a})
zvlrFormat :: Lens' ZoneViewsListResources (Maybe ZoneViewsListResourcesFormat)
zvlrFormat
= lens _zvlrFormat (\ s a -> s{_zvlrFormat = a})
zvlrZone :: Lens' ZoneViewsListResources Text
zvlrZone = lens _zvlrZone (\ s a -> s{_zvlrZone = a})
zvlrServiceName :: Lens' ZoneViewsListResources (Maybe Text)
zvlrServiceName
= lens _zvlrServiceName
(\ s a -> s{_zvlrServiceName = a})
zvlrPageToken :: Lens' ZoneViewsListResources (Maybe Text)
zvlrPageToken
= lens _zvlrPageToken
(\ s a -> s{_zvlrPageToken = a})
zvlrMaxResults :: Lens' ZoneViewsListResources Int32
zvlrMaxResults
= lens _zvlrMaxResults
(\ s a -> s{_zvlrMaxResults = a})
. _Coerce
instance GoogleRequest ZoneViewsListResources where
type Rs ZoneViewsListResources =
ZoneViewsListResourcesResponse
type Scopes ZoneViewsListResources =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/compute.readonly",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/ndev.cloudman.readonly"]
requestClient ZoneViewsListResources'{..}
= go _zvlrProject _zvlrZone _zvlrResourceView
(Just _zvlrListState)
_zvlrFormat
_zvlrServiceName
_zvlrPageToken
(Just _zvlrMaxResults)
(Just AltJSON)
resourceViewsService
where go
= buildClient
(Proxy :: Proxy ZoneViewsListResourcesResource)
mempty