{-# 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.Versions.Create
(
CatalogsProductsVersionsCreateResource
, catalogsProductsVersionsCreate
, CatalogsProductsVersionsCreate
, cpvcParent
, cpvcXgafv
, cpvcUploadProtocol
, cpvcAccessToken
, cpvcUploadType
, cpvcPayload
, cpvcCallback
) where
import Network.Google.CloudPrivateCatalogProducer.Types
import Network.Google.Prelude
type CatalogsProductsVersionsCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"versions" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudPrivatecatalogproducerV1beta1Version
:> Post '[JSON] GoogleLongrunningOperation
data CatalogsProductsVersionsCreate =
CatalogsProductsVersionsCreate'
{ _cpvcParent :: !Text
, _cpvcXgafv :: !(Maybe Xgafv)
, _cpvcUploadProtocol :: !(Maybe Text)
, _cpvcAccessToken :: !(Maybe Text)
, _cpvcUploadType :: !(Maybe Text)
, _cpvcPayload :: !GoogleCloudPrivatecatalogproducerV1beta1Version
, _cpvcCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
catalogsProductsVersionsCreate
:: Text
-> GoogleCloudPrivatecatalogproducerV1beta1Version
-> CatalogsProductsVersionsCreate
catalogsProductsVersionsCreate pCpvcParent_ pCpvcPayload_ =
CatalogsProductsVersionsCreate'
{ _cpvcParent = pCpvcParent_
, _cpvcXgafv = Nothing
, _cpvcUploadProtocol = Nothing
, _cpvcAccessToken = Nothing
, _cpvcUploadType = Nothing
, _cpvcPayload = pCpvcPayload_
, _cpvcCallback = Nothing
}
cpvcParent :: Lens' CatalogsProductsVersionsCreate Text
cpvcParent
= lens _cpvcParent (\ s a -> s{_cpvcParent = a})
cpvcXgafv :: Lens' CatalogsProductsVersionsCreate (Maybe Xgafv)
cpvcXgafv
= lens _cpvcXgafv (\ s a -> s{_cpvcXgafv = a})
cpvcUploadProtocol :: Lens' CatalogsProductsVersionsCreate (Maybe Text)
cpvcUploadProtocol
= lens _cpvcUploadProtocol
(\ s a -> s{_cpvcUploadProtocol = a})
cpvcAccessToken :: Lens' CatalogsProductsVersionsCreate (Maybe Text)
cpvcAccessToken
= lens _cpvcAccessToken
(\ s a -> s{_cpvcAccessToken = a})
cpvcUploadType :: Lens' CatalogsProductsVersionsCreate (Maybe Text)
cpvcUploadType
= lens _cpvcUploadType
(\ s a -> s{_cpvcUploadType = a})
cpvcPayload :: Lens' CatalogsProductsVersionsCreate GoogleCloudPrivatecatalogproducerV1beta1Version
cpvcPayload
= lens _cpvcPayload (\ s a -> s{_cpvcPayload = a})
cpvcCallback :: Lens' CatalogsProductsVersionsCreate (Maybe Text)
cpvcCallback
= lens _cpvcCallback (\ s a -> s{_cpvcCallback = a})
instance GoogleRequest CatalogsProductsVersionsCreate
where
type Rs CatalogsProductsVersionsCreate =
GoogleLongrunningOperation
type Scopes CatalogsProductsVersionsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient CatalogsProductsVersionsCreate'{..}
= go _cpvcParent _cpvcXgafv _cpvcUploadProtocol
_cpvcAccessToken
_cpvcUploadType
_cpvcCallback
(Just AltJSON)
_cpvcPayload
cloudPrivateCatalogProducerService
where go
= buildClient
(Proxy ::
Proxy CatalogsProductsVersionsCreateResource)
mempty