{-# 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.Patch
(
InterconnectAttachmentsPatchResource
, interconnectAttachmentsPatch
, InterconnectAttachmentsPatch
, iapRequestId
, iapProject
, iapPayload
, iapRegion
, iapInterconnectAttachment
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InterconnectAttachmentsPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"interconnectAttachments" :>
Capture "interconnectAttachment" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InterconnectAttachment :>
Patch '[JSON] Operation
data InterconnectAttachmentsPatch = InterconnectAttachmentsPatch'
{ _iapRequestId :: !(Maybe Text)
, _iapProject :: !Text
, _iapPayload :: !InterconnectAttachment
, _iapRegion :: !Text
, _iapInterconnectAttachment :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
interconnectAttachmentsPatch
:: Text
-> InterconnectAttachment
-> Text
-> Text
-> InterconnectAttachmentsPatch
interconnectAttachmentsPatch pIapProject_ pIapPayload_ pIapRegion_ pIapInterconnectAttachment_ =
InterconnectAttachmentsPatch'
{ _iapRequestId = Nothing
, _iapProject = pIapProject_
, _iapPayload = pIapPayload_
, _iapRegion = pIapRegion_
, _iapInterconnectAttachment = pIapInterconnectAttachment_
}
iapRequestId :: Lens' InterconnectAttachmentsPatch (Maybe Text)
iapRequestId
= lens _iapRequestId (\ s a -> s{_iapRequestId = a})
iapProject :: Lens' InterconnectAttachmentsPatch Text
iapProject
= lens _iapProject (\ s a -> s{_iapProject = a})
iapPayload :: Lens' InterconnectAttachmentsPatch InterconnectAttachment
iapPayload
= lens _iapPayload (\ s a -> s{_iapPayload = a})
iapRegion :: Lens' InterconnectAttachmentsPatch Text
iapRegion
= lens _iapRegion (\ s a -> s{_iapRegion = a})
iapInterconnectAttachment :: Lens' InterconnectAttachmentsPatch Text
iapInterconnectAttachment
= lens _iapInterconnectAttachment
(\ s a -> s{_iapInterconnectAttachment = a})
instance GoogleRequest InterconnectAttachmentsPatch
where
type Rs InterconnectAttachmentsPatch = Operation
type Scopes InterconnectAttachmentsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InterconnectAttachmentsPatch'{..}
= go _iapProject _iapRegion
_iapInterconnectAttachment
_iapRequestId
(Just AltJSON)
_iapPayload
computeService
where go
= buildClient
(Proxy :: Proxy InterconnectAttachmentsPatchResource)
mempty