{-# 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.Content.Productstatuses.Get
(
ProductstatusesGetResource
, productstatusesGet
, ProductstatusesGet
, pgMerchantId
, pgDestinations
, pgProductId
) where
import Network.Google.Prelude
import Network.Google.ShoppingContent.Types
type ProductstatusesGetResource =
"content" :>
"v2.1" :>
Capture "merchantId" (Textual Word64) :>
"productstatuses" :>
Capture "productId" Text :>
QueryParams "destinations" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] ProductStatus
data ProductstatusesGet = ProductstatusesGet'
{ _pgMerchantId :: !(Textual Word64)
, _pgDestinations :: !(Maybe [Text])
, _pgProductId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
productstatusesGet
:: Word64
-> Text
-> ProductstatusesGet
productstatusesGet pPgMerchantId_ pPgProductId_ =
ProductstatusesGet'
{ _pgMerchantId = _Coerce # pPgMerchantId_
, _pgDestinations = Nothing
, _pgProductId = pPgProductId_
}
pgMerchantId :: Lens' ProductstatusesGet Word64
pgMerchantId
= lens _pgMerchantId (\ s a -> s{_pgMerchantId = a})
. _Coerce
pgDestinations :: Lens' ProductstatusesGet [Text]
pgDestinations
= lens _pgDestinations
(\ s a -> s{_pgDestinations = a})
. _Default
. _Coerce
pgProductId :: Lens' ProductstatusesGet Text
pgProductId
= lens _pgProductId (\ s a -> s{_pgProductId = a})
instance GoogleRequest ProductstatusesGet where
type Rs ProductstatusesGet = ProductStatus
type Scopes ProductstatusesGet =
'["https://www.googleapis.com/auth/content"]
requestClient ProductstatusesGet'{..}
= go _pgMerchantId _pgProductId
(_pgDestinations ^. _Default)
(Just AltJSON)
shoppingContentService
where go
= buildClient
(Proxy :: Proxy ProductstatusesGetResource)
mempty