{-# 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.InterconnectAttachments.Insert
(
InterconnectAttachmentsInsertResource
, interconnectAttachmentsInsert
, InterconnectAttachmentsInsert
, iaiRequestId
, iaiProject
, iaiPayload
, iaiRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InterconnectAttachmentsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"interconnectAttachments" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InterconnectAttachment :>
Post '[JSON] Operation
data InterconnectAttachmentsInsert = InterconnectAttachmentsInsert'
{ _iaiRequestId :: !(Maybe Text)
, _iaiProject :: !Text
, _iaiPayload :: !InterconnectAttachment
, _iaiRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
interconnectAttachmentsInsert
:: Text
-> InterconnectAttachment
-> Text
-> InterconnectAttachmentsInsert
interconnectAttachmentsInsert pIaiProject_ pIaiPayload_ pIaiRegion_ =
InterconnectAttachmentsInsert'
{ _iaiRequestId = Nothing
, _iaiProject = pIaiProject_
, _iaiPayload = pIaiPayload_
, _iaiRegion = pIaiRegion_
}
iaiRequestId :: Lens' InterconnectAttachmentsInsert (Maybe Text)
iaiRequestId
= lens _iaiRequestId (\ s a -> s{_iaiRequestId = a})
iaiProject :: Lens' InterconnectAttachmentsInsert Text
iaiProject
= lens _iaiProject (\ s a -> s{_iaiProject = a})
iaiPayload :: Lens' InterconnectAttachmentsInsert InterconnectAttachment
iaiPayload
= lens _iaiPayload (\ s a -> s{_iaiPayload = a})
iaiRegion :: Lens' InterconnectAttachmentsInsert Text
iaiRegion
= lens _iaiRegion (\ s a -> s{_iaiRegion = a})
instance GoogleRequest InterconnectAttachmentsInsert
where
type Rs InterconnectAttachmentsInsert = Operation
type Scopes InterconnectAttachmentsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InterconnectAttachmentsInsert'{..}
= go _iaiProject _iaiRegion _iaiRequestId
(Just AltJSON)
_iaiPayload
computeService
where go
= buildClient
(Proxy ::
Proxy InterconnectAttachmentsInsertResource)
mempty