{-# 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.Tracing.Projects.Traces.BatchWrite
(
ProjectsTracesBatchWriteResource
, projectsTracesBatchWrite
, ProjectsTracesBatchWrite
, ptbwXgafv
, ptbwUploadProtocol
, ptbwPp
, ptbwAccessToken
, ptbwUploadType
, ptbwPayload
, ptbwBearerToken
, ptbwName
, ptbwCallback
) where
import Network.Google.Prelude
import Network.Google.Tracing.Types
type ProjectsTracesBatchWriteResource =
"v2" :>
Capture "name" Text :>
"traces:batchWrite" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "pp" Bool :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "bearer_token" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchWriteSpansRequest :>
Post '[JSON] Empty
data ProjectsTracesBatchWrite = ProjectsTracesBatchWrite'
{ _ptbwXgafv :: !(Maybe Xgafv)
, _ptbwUploadProtocol :: !(Maybe Text)
, _ptbwPp :: !Bool
, _ptbwAccessToken :: !(Maybe Text)
, _ptbwUploadType :: !(Maybe Text)
, _ptbwPayload :: !BatchWriteSpansRequest
, _ptbwBearerToken :: !(Maybe Text)
, _ptbwName :: !Text
, _ptbwCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsTracesBatchWrite
:: BatchWriteSpansRequest
-> Text
-> ProjectsTracesBatchWrite
projectsTracesBatchWrite pPtbwPayload_ pPtbwName_ =
ProjectsTracesBatchWrite'
{ _ptbwXgafv = Nothing
, _ptbwUploadProtocol = Nothing
, _ptbwPp = True
, _ptbwAccessToken = Nothing
, _ptbwUploadType = Nothing
, _ptbwPayload = pPtbwPayload_
, _ptbwBearerToken = Nothing
, _ptbwName = pPtbwName_
, _ptbwCallback = Nothing
}
ptbwXgafv :: Lens' ProjectsTracesBatchWrite (Maybe Xgafv)
ptbwXgafv
= lens _ptbwXgafv (\ s a -> s{_ptbwXgafv = a})
ptbwUploadProtocol :: Lens' ProjectsTracesBatchWrite (Maybe Text)
ptbwUploadProtocol
= lens _ptbwUploadProtocol
(\ s a -> s{_ptbwUploadProtocol = a})
ptbwPp :: Lens' ProjectsTracesBatchWrite Bool
ptbwPp = lens _ptbwPp (\ s a -> s{_ptbwPp = a})
ptbwAccessToken :: Lens' ProjectsTracesBatchWrite (Maybe Text)
ptbwAccessToken
= lens _ptbwAccessToken
(\ s a -> s{_ptbwAccessToken = a})
ptbwUploadType :: Lens' ProjectsTracesBatchWrite (Maybe Text)
ptbwUploadType
= lens _ptbwUploadType
(\ s a -> s{_ptbwUploadType = a})
ptbwPayload :: Lens' ProjectsTracesBatchWrite BatchWriteSpansRequest
ptbwPayload
= lens _ptbwPayload (\ s a -> s{_ptbwPayload = a})
ptbwBearerToken :: Lens' ProjectsTracesBatchWrite (Maybe Text)
ptbwBearerToken
= lens _ptbwBearerToken
(\ s a -> s{_ptbwBearerToken = a})
ptbwName :: Lens' ProjectsTracesBatchWrite Text
ptbwName = lens _ptbwName (\ s a -> s{_ptbwName = a})
ptbwCallback :: Lens' ProjectsTracesBatchWrite (Maybe Text)
ptbwCallback
= lens _ptbwCallback (\ s a -> s{_ptbwCallback = a})
instance GoogleRequest ProjectsTracesBatchWrite where
type Rs ProjectsTracesBatchWrite = Empty
type Scopes ProjectsTracesBatchWrite =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/trace.append"]
requestClient ProjectsTracesBatchWrite'{..}
= go _ptbwName _ptbwXgafv _ptbwUploadProtocol
(Just _ptbwPp)
_ptbwAccessToken
_ptbwUploadType
_ptbwBearerToken
_ptbwCallback
(Just AltJSON)
_ptbwPayload
tracingService
where go
= buildClient
(Proxy :: Proxy ProjectsTracesBatchWriteResource)
mempty