{-# 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.BackendBuckets.Insert
(
BackendBucketsInsertResource
, backendBucketsInsert
, BackendBucketsInsert
, bbiRequestId
, bbiProject
, bbiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type BackendBucketsInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"backendBuckets" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BackendBucket :>
Post '[JSON] Operation
data BackendBucketsInsert = BackendBucketsInsert'
{ _bbiRequestId :: !(Maybe Text)
, _bbiProject :: !Text
, _bbiPayload :: !BackendBucket
} deriving (Eq,Show,Data,Typeable,Generic)
backendBucketsInsert
:: Text
-> BackendBucket
-> BackendBucketsInsert
backendBucketsInsert pBbiProject_ pBbiPayload_ =
BackendBucketsInsert'
{ _bbiRequestId = Nothing
, _bbiProject = pBbiProject_
, _bbiPayload = pBbiPayload_
}
bbiRequestId :: Lens' BackendBucketsInsert (Maybe Text)
bbiRequestId
= lens _bbiRequestId (\ s a -> s{_bbiRequestId = a})
bbiProject :: Lens' BackendBucketsInsert Text
bbiProject
= lens _bbiProject (\ s a -> s{_bbiProject = a})
bbiPayload :: Lens' BackendBucketsInsert BackendBucket
bbiPayload
= lens _bbiPayload (\ s a -> s{_bbiPayload = a})
instance GoogleRequest BackendBucketsInsert where
type Rs BackendBucketsInsert = Operation
type Scopes BackendBucketsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient BackendBucketsInsert'{..}
= go _bbiProject _bbiRequestId (Just AltJSON)
_bbiPayload
computeService
where go
= buildClient
(Proxy :: Proxy BackendBucketsInsertResource)
mempty