{-# 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.SetNamedPorts
(
InstanceGroupsSetNamedPortsResource
, instanceGroupsSetNamedPorts
, InstanceGroupsSetNamedPorts
, igsnpRequestId
, igsnpProject
, igsnpZone
, igsnpPayload
, igsnpInstanceGroup
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InstanceGroupsSetNamedPortsResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"instanceGroups" :>
Capture "instanceGroup" Text :>
"setNamedPorts" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstanceGroupsSetNamedPortsRequest :>
Post '[JSON] Operation
data InstanceGroupsSetNamedPorts = InstanceGroupsSetNamedPorts'
{ _igsnpRequestId :: !(Maybe Text)
, _igsnpProject :: !Text
, _igsnpZone :: !Text
, _igsnpPayload :: !InstanceGroupsSetNamedPortsRequest
, _igsnpInstanceGroup :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instanceGroupsSetNamedPorts
:: Text
-> Text
-> InstanceGroupsSetNamedPortsRequest
-> Text
-> InstanceGroupsSetNamedPorts
instanceGroupsSetNamedPorts pIgsnpProject_ pIgsnpZone_ pIgsnpPayload_ pIgsnpInstanceGroup_ =
InstanceGroupsSetNamedPorts'
{ _igsnpRequestId = Nothing
, _igsnpProject = pIgsnpProject_
, _igsnpZone = pIgsnpZone_
, _igsnpPayload = pIgsnpPayload_
, _igsnpInstanceGroup = pIgsnpInstanceGroup_
}
igsnpRequestId :: Lens' InstanceGroupsSetNamedPorts (Maybe Text)
igsnpRequestId
= lens _igsnpRequestId
(\ s a -> s{_igsnpRequestId = a})
igsnpProject :: Lens' InstanceGroupsSetNamedPorts Text
igsnpProject
= lens _igsnpProject (\ s a -> s{_igsnpProject = a})
igsnpZone :: Lens' InstanceGroupsSetNamedPorts Text
igsnpZone
= lens _igsnpZone (\ s a -> s{_igsnpZone = a})
igsnpPayload :: Lens' InstanceGroupsSetNamedPorts InstanceGroupsSetNamedPortsRequest
igsnpPayload
= lens _igsnpPayload (\ s a -> s{_igsnpPayload = a})
igsnpInstanceGroup :: Lens' InstanceGroupsSetNamedPorts Text
igsnpInstanceGroup
= lens _igsnpInstanceGroup
(\ s a -> s{_igsnpInstanceGroup = a})
instance GoogleRequest InstanceGroupsSetNamedPorts
where
type Rs InstanceGroupsSetNamedPorts = Operation
type Scopes InstanceGroupsSetNamedPorts =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InstanceGroupsSetNamedPorts'{..}
= go _igsnpProject _igsnpZone _igsnpInstanceGroup
_igsnpRequestId
(Just AltJSON)
_igsnpPayload
computeService
where go
= buildClient
(Proxy :: Proxy InstanceGroupsSetNamedPortsResource)
mempty