{-# 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.Interconnects.Patch
(
InterconnectsPatchResource
, interconnectsPatch
, InterconnectsPatch
, ipRequestId
, ipProject
, ipPayload
, ipInterconnect
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type InterconnectsPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"interconnects" :>
Capture "interconnect" Text :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Interconnect :>
Patch '[JSON] Operation
data InterconnectsPatch = InterconnectsPatch'
{ _ipRequestId :: !(Maybe Text)
, _ipProject :: !Text
, _ipPayload :: !Interconnect
, _ipInterconnect :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
interconnectsPatch
:: Text
-> Interconnect
-> Text
-> InterconnectsPatch
interconnectsPatch pIpProject_ pIpPayload_ pIpInterconnect_ =
InterconnectsPatch'
{ _ipRequestId = Nothing
, _ipProject = pIpProject_
, _ipPayload = pIpPayload_
, _ipInterconnect = pIpInterconnect_
}
ipRequestId :: Lens' InterconnectsPatch (Maybe Text)
ipRequestId
= lens _ipRequestId (\ s a -> s{_ipRequestId = a})
ipProject :: Lens' InterconnectsPatch Text
ipProject
= lens _ipProject (\ s a -> s{_ipProject = a})
ipPayload :: Lens' InterconnectsPatch Interconnect
ipPayload
= lens _ipPayload (\ s a -> s{_ipPayload = a})
ipInterconnect :: Lens' InterconnectsPatch Text
ipInterconnect
= lens _ipInterconnect
(\ s a -> s{_ipInterconnect = a})
instance GoogleRequest InterconnectsPatch where
type Rs InterconnectsPatch = Operation
type Scopes InterconnectsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient InterconnectsPatch'{..}
= go _ipProject _ipInterconnect _ipRequestId
(Just AltJSON)
_ipPayload
computeService
where go
= buildClient
(Proxy :: Proxy InterconnectsPatchResource)
mempty