{-# 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.ResourceViews.ZoneViews.GetService
(
ZoneViewsGetServiceResource
, zoneViewsGetService
, ZoneViewsGetService
, zvgsResourceView
, zvgsResourceName
, zvgsProject
, zvgsZone
) where
import Network.Google.Prelude
import Network.Google.ResourceViews.Types
type ZoneViewsGetServiceResource =
"resourceviews" :>
"v1beta2" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"resourceViews" :>
Capture "resourceView" Text :>
"getService" :>
QueryParam "resourceName" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] ZoneViewsGetServiceResponse
-- | Get the service information of a resource view or a resource.
--
-- /See:/ 'zoneViewsGetService' smart constructor.
data ZoneViewsGetService = ZoneViewsGetService'
{ _zvgsResourceView :: !Text
, _zvgsResourceName :: !(Maybe Text)
, _zvgsProject :: !Text
, _zvgsZone :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'ZoneViewsGetService' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zvgsResourceView'
--
-- * 'zvgsResourceName'
--
-- * 'zvgsProject'
--
-- * 'zvgsZone'
zoneViewsGetService
:: Text -- ^ 'zvgsResourceView'
-> Text -- ^ 'zvgsProject'
-> Text -- ^ 'zvgsZone'
-> ZoneViewsGetService
zoneViewsGetService pZvgsResourceView_ pZvgsProject_ pZvgsZone_ =
ZoneViewsGetService'
{ _zvgsResourceView = pZvgsResourceView_
, _zvgsResourceName = Nothing
, _zvgsProject = pZvgsProject_
, _zvgsZone = pZvgsZone_
}
-- | The name of the resource view.
zvgsResourceView :: Lens' ZoneViewsGetService Text
zvgsResourceView
= lens _zvgsResourceView
(\ s a -> s{_zvgsResourceView = a})
-- | The name of the resource if user wants to get the service information of
-- the resource.
zvgsResourceName :: Lens' ZoneViewsGetService (Maybe Text)
zvgsResourceName
= lens _zvgsResourceName
(\ s a -> s{_zvgsResourceName = a})
-- | The project name of the resource view.
zvgsProject :: Lens' ZoneViewsGetService Text
zvgsProject
= lens _zvgsProject (\ s a -> s{_zvgsProject = a})
-- | The zone name of the resource view.
zvgsZone :: Lens' ZoneViewsGetService Text
zvgsZone = lens _zvgsZone (\ s a -> s{_zvgsZone = a})
instance GoogleRequest ZoneViewsGetService where
type Rs ZoneViewsGetService =
ZoneViewsGetServiceResponse
type Scopes ZoneViewsGetService =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient ZoneViewsGetService'{..}
= go _zvgsProject _zvgsZone _zvgsResourceView
_zvgsResourceName
(Just AltJSON)
resourceViewsService
where go
= buildClient
(Proxy :: Proxy ZoneViewsGetServiceResource)
mempty