{-# 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.InstanceGroups.Insert
(
InstanceGroupsInsertResource
, instanceGroupsInsert
, InstanceGroupsInsert
, igiRequestId
, igiProject
, igiZone
, igiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstanceGroupsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instanceGroups" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstanceGroup :>
Post '[JSON] Operation
data InstanceGroupsInsert = InstanceGroupsInsert'
{ _igiRequestId :: !(Maybe Text)
, _igiProject :: !Text
, _igiZone :: !Text
, _igiPayload :: !InstanceGroup
} deriving (Eq,Show,Data,Typeable,Generic)
instanceGroupsInsert
:: Text
-> Text
-> InstanceGroup
-> InstanceGroupsInsert
instanceGroupsInsert pIgiProject_ pIgiZone_ pIgiPayload_ =
InstanceGroupsInsert'
{ _igiRequestId = Nothing
, _igiProject = pIgiProject_
, _igiZone = pIgiZone_
, _igiPayload = pIgiPayload_
}
igiRequestId :: Lens' InstanceGroupsInsert (Maybe Text)
igiRequestId
= lens _igiRequestId (\ s a -> s{_igiRequestId = a})
igiProject :: Lens' InstanceGroupsInsert Text
igiProject
= lens _igiProject (\ s a -> s{_igiProject = a})
igiZone :: Lens' InstanceGroupsInsert Text
igiZone = lens _igiZone (\ s a -> s{_igiZone = a})
igiPayload :: Lens' InstanceGroupsInsert InstanceGroup
igiPayload
= lens _igiPayload (\ s a -> s{_igiPayload = a})
instance GoogleRequest InstanceGroupsInsert where
type Rs InstanceGroupsInsert = Operation
type Scopes InstanceGroupsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstanceGroupsInsert'{..}
= go _igiProject _igiZone _igiRequestId
(Just AltJSON)
_igiPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstanceGroupsInsertResource)
mempty