{-# 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.Licenses.Insert
(
LicensesInsertResource
, licensesInsert
, LicensesInsert
, liRequestId
, liProject
, liPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type LicensesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"licenses" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] License :> Post '[JSON] Operation
data LicensesInsert = LicensesInsert'
{ _liRequestId :: !(Maybe Text)
, _liProject :: !Text
, _liPayload :: !License
} deriving (Eq,Show,Data,Typeable,Generic)
licensesInsert
:: Text
-> License
-> LicensesInsert
licensesInsert pLiProject_ pLiPayload_ =
LicensesInsert'
{ _liRequestId = Nothing
, _liProject = pLiProject_
, _liPayload = pLiPayload_
}
liRequestId :: Lens' LicensesInsert (Maybe Text)
liRequestId
= lens _liRequestId (\ s a -> s{_liRequestId = a})
liProject :: Lens' LicensesInsert Text
liProject
= lens _liProject (\ s a -> s{_liProject = a})
liPayload :: Lens' LicensesInsert License
liPayload
= lens _liPayload (\ s a -> s{_liPayload = a})
instance GoogleRequest LicensesInsert where
type Rs LicensesInsert = Operation
type Scopes LicensesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient LicensesInsert'{..}
= go _liProject _liRequestId (Just AltJSON)
_liPayload
computeService
where go
= buildClient (Proxy :: Proxy LicensesInsertResource)
mempty