{-# 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.Addresses.Insert
(
AddressesInsertResource
, addressesInsert
, AddressesInsert
, aiRequestId
, aiProject
, aiPayload
, aiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type AddressesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"addresses" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Address :> Post '[JSON] Operation
data AddressesInsert = AddressesInsert'
{ _aiRequestId :: !(Maybe Text)
, _aiProject :: !Text
, _aiPayload :: !Address
, _aiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
addressesInsert
:: Text
-> Address
-> Text
-> AddressesInsert
addressesInsert pAiProject_ pAiPayload_ pAiRegion_ =
AddressesInsert'
{ _aiRequestId = Nothing
, _aiProject = pAiProject_
, _aiPayload = pAiPayload_
, _aiRegion = pAiRegion_
}
aiRequestId :: Lens' AddressesInsert (Maybe Text)
aiRequestId
= lens _aiRequestId (\ s a -> s{_aiRequestId = a})
aiProject :: Lens' AddressesInsert Text
aiProject
= lens _aiProject (\ s a -> s{_aiProject = a})
aiPayload :: Lens' AddressesInsert Address
aiPayload
= lens _aiPayload (\ s a -> s{_aiPayload = a})
aiRegion :: Lens' AddressesInsert Text
aiRegion = lens _aiRegion (\ s a -> s{_aiRegion = a})
instance GoogleRequest AddressesInsert where
type Rs AddressesInsert = Operation
type Scopes AddressesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient AddressesInsert'{..}
= go _aiProject _aiRegion _aiRequestId (Just AltJSON)
_aiPayload
computeService
where go
= buildClient
(Proxy :: Proxy AddressesInsertResource)
mempty