{-# 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.NetworkEndpointGroups.AttachNetworkEndpoints
(
NetworkEndpointGroupsAttachNetworkEndpointsResource
, networkEndpointGroupsAttachNetworkEndpoints
, NetworkEndpointGroupsAttachNetworkEndpoints
, neganeRequestId
, neganeProject
, neganeZone
, neganePayload
, neganeNetworkEndpointGroup
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NetworkEndpointGroupsAttachNetworkEndpointsResource
=
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"networkEndpointGroups" :>
Capture "networkEndpointGroup" Text :>
"attachNetworkEndpoints" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
NetworkEndpointGroupsAttachEndpointsRequest
:> Post '[JSON] Operation
data NetworkEndpointGroupsAttachNetworkEndpoints =
NetworkEndpointGroupsAttachNetworkEndpoints'
{ _neganeRequestId :: !(Maybe Text)
, _neganeProject :: !Text
, _neganeZone :: !Text
, _neganePayload :: !NetworkEndpointGroupsAttachEndpointsRequest
, _neganeNetworkEndpointGroup :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
networkEndpointGroupsAttachNetworkEndpoints
:: Text
-> Text
-> NetworkEndpointGroupsAttachEndpointsRequest
-> Text
-> NetworkEndpointGroupsAttachNetworkEndpoints
networkEndpointGroupsAttachNetworkEndpoints pNeganeProject_ pNeganeZone_ pNeganePayload_ pNeganeNetworkEndpointGroup_ =
NetworkEndpointGroupsAttachNetworkEndpoints'
{ _neganeRequestId = Nothing
, _neganeProject = pNeganeProject_
, _neganeZone = pNeganeZone_
, _neganePayload = pNeganePayload_
, _neganeNetworkEndpointGroup = pNeganeNetworkEndpointGroup_
}
neganeRequestId :: Lens' NetworkEndpointGroupsAttachNetworkEndpoints (Maybe Text)
neganeRequestId
= lens _neganeRequestId
(\ s a -> s{_neganeRequestId = a})
neganeProject :: Lens' NetworkEndpointGroupsAttachNetworkEndpoints Text
neganeProject
= lens _neganeProject
(\ s a -> s{_neganeProject = a})
neganeZone :: Lens' NetworkEndpointGroupsAttachNetworkEndpoints Text
neganeZone
= lens _neganeZone (\ s a -> s{_neganeZone = a})
neganePayload :: Lens' NetworkEndpointGroupsAttachNetworkEndpoints NetworkEndpointGroupsAttachEndpointsRequest
neganePayload
= lens _neganePayload
(\ s a -> s{_neganePayload = a})
neganeNetworkEndpointGroup :: Lens' NetworkEndpointGroupsAttachNetworkEndpoints Text
neganeNetworkEndpointGroup
= lens _neganeNetworkEndpointGroup
(\ s a -> s{_neganeNetworkEndpointGroup = a})
instance GoogleRequest
NetworkEndpointGroupsAttachNetworkEndpoints
where
type Rs NetworkEndpointGroupsAttachNetworkEndpoints =
Operation
type Scopes
NetworkEndpointGroupsAttachNetworkEndpoints
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient
NetworkEndpointGroupsAttachNetworkEndpoints'{..}
= go _neganeProject _neganeZone
_neganeNetworkEndpointGroup
_neganeRequestId
(Just AltJSON)
_neganePayload
computeService
where go
= buildClient
(Proxy ::
Proxy
NetworkEndpointGroupsAttachNetworkEndpointsResource)
mempty