{-# 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.AddInstances
(
InstanceGroupsAddInstancesResource
, instanceGroupsAddInstances
, InstanceGroupsAddInstances
, igaiRequestId
, igaiProject
, igaiZone
, igaiPayload
, igaiInstanceGroup
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstanceGroupsAddInstancesResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instanceGroups" :>
Capture "instanceGroup" Text :>
"addInstances" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstanceGroupsAddInstancesRequest :>
Post '[JSON] Operation
data InstanceGroupsAddInstances = InstanceGroupsAddInstances'
{ _igaiRequestId :: !(Maybe Text)
, _igaiProject :: !Text
, _igaiZone :: !Text
, _igaiPayload :: !InstanceGroupsAddInstancesRequest
, _igaiInstanceGroup :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instanceGroupsAddInstances
:: Text
-> Text
-> InstanceGroupsAddInstancesRequest
-> Text
-> InstanceGroupsAddInstances
instanceGroupsAddInstances pIgaiProject_ pIgaiZone_ pIgaiPayload_ pIgaiInstanceGroup_ =
InstanceGroupsAddInstances'
{ _igaiRequestId = Nothing
, _igaiProject = pIgaiProject_
, _igaiZone = pIgaiZone_
, _igaiPayload = pIgaiPayload_
, _igaiInstanceGroup = pIgaiInstanceGroup_
}
igaiRequestId :: Lens' InstanceGroupsAddInstances (Maybe Text)
igaiRequestId
= lens _igaiRequestId
(\ s a -> s{_igaiRequestId = a})
igaiProject :: Lens' InstanceGroupsAddInstances Text
igaiProject
= lens _igaiProject (\ s a -> s{_igaiProject = a})
igaiZone :: Lens' InstanceGroupsAddInstances Text
igaiZone = lens _igaiZone (\ s a -> s{_igaiZone = a})
igaiPayload :: Lens' InstanceGroupsAddInstances InstanceGroupsAddInstancesRequest
igaiPayload
= lens _igaiPayload (\ s a -> s{_igaiPayload = a})
igaiInstanceGroup :: Lens' InstanceGroupsAddInstances Text
igaiInstanceGroup
= lens _igaiInstanceGroup
(\ s a -> s{_igaiInstanceGroup = a})
instance GoogleRequest InstanceGroupsAddInstances
where
type Rs InstanceGroupsAddInstances = Operation
type Scopes InstanceGroupsAddInstances =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstanceGroupsAddInstances'{..}
= go _igaiProject _igaiZone _igaiInstanceGroup
_igaiRequestId
(Just AltJSON)
_igaiPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstanceGroupsAddInstancesResource)
mempty