{-# 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.CloudPrivateCatalogProducer.Catalogs.Products.Icons.Upload
(
CatalogsProductsIconsUploadResource
, catalogsProductsIconsUpload
, CatalogsProductsIconsUpload
, cpiuXgafv
, cpiuUploadProtocol
, cpiuAccessToken
, cpiuUploadType
, cpiuPayload
, cpiuProduct
, cpiuCallback
) where
import Network.Google.CloudPrivateCatalogProducer.Types
import Network.Google.Prelude
type CatalogsProductsIconsUploadResource =
"v1beta1" :>
Capture "product" Text :>
"icons:upload" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudPrivatecatalogproducerV1beta1UploadIconRequest
:> Post '[JSON] GoogleProtobufEmpty
data CatalogsProductsIconsUpload =
CatalogsProductsIconsUpload'
{ _cpiuXgafv :: !(Maybe Xgafv)
, _cpiuUploadProtocol :: !(Maybe Text)
, _cpiuAccessToken :: !(Maybe Text)
, _cpiuUploadType :: !(Maybe Text)
, _cpiuPayload :: !GoogleCloudPrivatecatalogproducerV1beta1UploadIconRequest
, _cpiuProduct :: !Text
, _cpiuCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
catalogsProductsIconsUpload
:: GoogleCloudPrivatecatalogproducerV1beta1UploadIconRequest
-> Text
-> CatalogsProductsIconsUpload
catalogsProductsIconsUpload pCpiuPayload_ pCpiuProduct_ =
CatalogsProductsIconsUpload'
{ _cpiuXgafv = Nothing
, _cpiuUploadProtocol = Nothing
, _cpiuAccessToken = Nothing
, _cpiuUploadType = Nothing
, _cpiuPayload = pCpiuPayload_
, _cpiuProduct = pCpiuProduct_
, _cpiuCallback = Nothing
}
cpiuXgafv :: Lens' CatalogsProductsIconsUpload (Maybe Xgafv)
cpiuXgafv
= lens _cpiuXgafv (\ s a -> s{_cpiuXgafv = a})
cpiuUploadProtocol :: Lens' CatalogsProductsIconsUpload (Maybe Text)
cpiuUploadProtocol
= lens _cpiuUploadProtocol
(\ s a -> s{_cpiuUploadProtocol = a})
cpiuAccessToken :: Lens' CatalogsProductsIconsUpload (Maybe Text)
cpiuAccessToken
= lens _cpiuAccessToken
(\ s a -> s{_cpiuAccessToken = a})
cpiuUploadType :: Lens' CatalogsProductsIconsUpload (Maybe Text)
cpiuUploadType
= lens _cpiuUploadType
(\ s a -> s{_cpiuUploadType = a})
cpiuPayload :: Lens' CatalogsProductsIconsUpload GoogleCloudPrivatecatalogproducerV1beta1UploadIconRequest
cpiuPayload
= lens _cpiuPayload (\ s a -> s{_cpiuPayload = a})
cpiuProduct :: Lens' CatalogsProductsIconsUpload Text
cpiuProduct
= lens _cpiuProduct (\ s a -> s{_cpiuProduct = a})
cpiuCallback :: Lens' CatalogsProductsIconsUpload (Maybe Text)
cpiuCallback
= lens _cpiuCallback (\ s a -> s{_cpiuCallback = a})
instance GoogleRequest CatalogsProductsIconsUpload
where
type Rs CatalogsProductsIconsUpload =
GoogleProtobufEmpty
type Scopes CatalogsProductsIconsUpload =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient CatalogsProductsIconsUpload'{..}
= go _cpiuProduct _cpiuXgafv _cpiuUploadProtocol
_cpiuAccessToken
_cpiuUploadType
_cpiuCallback
(Just AltJSON)
_cpiuPayload
cloudPrivateCatalogProducerService
where go
= buildClient
(Proxy :: Proxy CatalogsProductsIconsUploadResource)
mempty