{-# 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.Poly.Assets.Get
(
AssetsGetResource
, assetsGet
, AssetsGet
, agXgafv
, agUploadProtocol
, agAccessToken
, agUploadType
, agName
, agCallback
) where
import Network.Google.Poly.Types
import Network.Google.Prelude
type AssetsGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Asset
data AssetsGet = AssetsGet'
{ _agXgafv :: !(Maybe Xgafv)
, _agUploadProtocol :: !(Maybe Text)
, _agAccessToken :: !(Maybe Text)
, _agUploadType :: !(Maybe Text)
, _agName :: !Text
, _agCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
assetsGet
:: Text
-> AssetsGet
assetsGet pAgName_ =
AssetsGet'
{ _agXgafv = Nothing
, _agUploadProtocol = Nothing
, _agAccessToken = Nothing
, _agUploadType = Nothing
, _agName = pAgName_
, _agCallback = Nothing
}
agXgafv :: Lens' AssetsGet (Maybe Xgafv)
agXgafv = lens _agXgafv (\ s a -> s{_agXgafv = a})
agUploadProtocol :: Lens' AssetsGet (Maybe Text)
agUploadProtocol
= lens _agUploadProtocol
(\ s a -> s{_agUploadProtocol = a})
agAccessToken :: Lens' AssetsGet (Maybe Text)
agAccessToken
= lens _agAccessToken
(\ s a -> s{_agAccessToken = a})
agUploadType :: Lens' AssetsGet (Maybe Text)
agUploadType
= lens _agUploadType (\ s a -> s{_agUploadType = a})
agName :: Lens' AssetsGet Text
agName = lens _agName (\ s a -> s{_agName = a})
agCallback :: Lens' AssetsGet (Maybe Text)
agCallback
= lens _agCallback (\ s a -> s{_agCallback = a})
instance GoogleRequest AssetsGet where
type Rs AssetsGet = Asset
type Scopes AssetsGet = '[]
requestClient AssetsGet'{..}
= go _agName _agXgafv _agUploadProtocol
_agAccessToken
_agUploadType
_agCallback
(Just AltJSON)
polyService
where go
= buildClient (Proxy :: Proxy AssetsGetResource)
mempty