{-# 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.Insert
(
NetworkEndpointGroupsInsertResource
, networkEndpointGroupsInsert
, NetworkEndpointGroupsInsert
, negiRequestId
, negiProject
, negiZone
, negiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type NetworkEndpointGroupsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"networkEndpointGroups" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] NetworkEndpointGroup :>
Post '[JSON] Operation
data NetworkEndpointGroupsInsert =
NetworkEndpointGroupsInsert'
{ _negiRequestId :: !(Maybe Text)
, _negiProject :: !Text
, _negiZone :: !Text
, _negiPayload :: !NetworkEndpointGroup
}
deriving (Eq, Show, Data, Typeable, Generic)
networkEndpointGroupsInsert
:: Text
-> Text
-> NetworkEndpointGroup
-> NetworkEndpointGroupsInsert
networkEndpointGroupsInsert pNegiProject_ pNegiZone_ pNegiPayload_ =
NetworkEndpointGroupsInsert'
{ _negiRequestId = Nothing
, _negiProject = pNegiProject_
, _negiZone = pNegiZone_
, _negiPayload = pNegiPayload_
}
negiRequestId :: Lens' NetworkEndpointGroupsInsert (Maybe Text)
negiRequestId
= lens _negiRequestId
(\ s a -> s{_negiRequestId = a})
negiProject :: Lens' NetworkEndpointGroupsInsert Text
negiProject
= lens _negiProject (\ s a -> s{_negiProject = a})
negiZone :: Lens' NetworkEndpointGroupsInsert Text
negiZone = lens _negiZone (\ s a -> s{_negiZone = a})
negiPayload :: Lens' NetworkEndpointGroupsInsert NetworkEndpointGroup
negiPayload
= lens _negiPayload (\ s a -> s{_negiPayload = a})
instance GoogleRequest NetworkEndpointGroupsInsert
where
type Rs NetworkEndpointGroupsInsert = Operation
type Scopes NetworkEndpointGroupsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient NetworkEndpointGroupsInsert'{..}
= go _negiProject _negiZone _negiRequestId
(Just AltJSON)
_negiPayload
computeService
where go
= buildClient
(Proxy :: Proxy NetworkEndpointGroupsInsertResource)
mempty