module Network.Google.Resource.ResourceViews.ZoneViews.Insert
(
ZoneViewsInsertResource
, zoneViewsInsert
, ZoneViewsInsert
, zviProject
, zviZone
, zviPayload
) where
import Network.Google.Prelude
import Network.Google.ResourceViews.Types
type ZoneViewsInsertResource =
"resourceviews" :>
"v1beta2" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"resourceViews" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ResourceView :>
Post '[JSON] Operation
data ZoneViewsInsert = ZoneViewsInsert'
{ _zviProject :: !Text
, _zviZone :: !Text
, _zviPayload :: !ResourceView
} deriving (Eq,Show,Data,Typeable,Generic)
zoneViewsInsert
:: Text
-> Text
-> ResourceView
-> ZoneViewsInsert
zoneViewsInsert pZviProject_ pZviZone_ pZviPayload_ =
ZoneViewsInsert'
{ _zviProject = pZviProject_
, _zviZone = pZviZone_
, _zviPayload = pZviPayload_
}
zviProject :: Lens' ZoneViewsInsert Text
zviProject
= lens _zviProject (\ s a -> s{_zviProject = a})
zviZone :: Lens' ZoneViewsInsert Text
zviZone = lens _zviZone (\ s a -> s{_zviZone = a})
zviPayload :: Lens' ZoneViewsInsert ResourceView
zviPayload
= lens _zviPayload (\ s a -> s{_zviPayload = a})
instance GoogleRequest ZoneViewsInsert where
type Rs ZoneViewsInsert = Operation
type Scopes ZoneViewsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/ndev.cloudman"]
requestClient ZoneViewsInsert'{..}
= go _zviProject _zviZone (Just AltJSON) _zviPayload
resourceViewsService
where go
= buildClient
(Proxy :: Proxy ZoneViewsInsertResource)
mempty