{-# 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.Compute.RegionDisks.Insert
(
RegionDisksInsertResource
, regionDisksInsert
, RegionDisksInsert
, rdiRequestId
, rdiSourceImage
, rdiProject
, rdiPayload
, rdiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionDisksInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"disks" :>
QueryParam "requestId" Text :>
QueryParam "sourceImage" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Disk :> Post '[JSON] Operation
data RegionDisksInsert = RegionDisksInsert'
{ _rdiRequestId :: !(Maybe Text)
, _rdiSourceImage :: !(Maybe Text)
, _rdiProject :: !Text
, _rdiPayload :: !Disk
, _rdiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionDisksInsert
:: Text
-> Disk
-> Text
-> RegionDisksInsert
regionDisksInsert pRdiProject_ pRdiPayload_ pRdiRegion_ =
RegionDisksInsert'
{ _rdiRequestId = Nothing
, _rdiSourceImage = Nothing
, _rdiProject = pRdiProject_
, _rdiPayload = pRdiPayload_
, _rdiRegion = pRdiRegion_
}
rdiRequestId :: Lens' RegionDisksInsert (Maybe Text)
rdiRequestId
= lens _rdiRequestId (\ s a -> s{_rdiRequestId = a})
rdiSourceImage :: Lens' RegionDisksInsert (Maybe Text)
rdiSourceImage
= lens _rdiSourceImage
(\ s a -> s{_rdiSourceImage = a})
rdiProject :: Lens' RegionDisksInsert Text
rdiProject
= lens _rdiProject (\ s a -> s{_rdiProject = a})
rdiPayload :: Lens' RegionDisksInsert Disk
rdiPayload
= lens _rdiPayload (\ s a -> s{_rdiPayload = a})
rdiRegion :: Lens' RegionDisksInsert Text
rdiRegion
= lens _rdiRegion (\ s a -> s{_rdiRegion = a})
instance GoogleRequest RegionDisksInsert where
type Rs RegionDisksInsert = Operation
type Scopes RegionDisksInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RegionDisksInsert'{..}
= go _rdiProject _rdiRegion _rdiRequestId
_rdiSourceImage
(Just AltJSON)
_rdiPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionDisksInsertResource)
mempty