{-# 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.Cloudlatencytest.Statscollection.Updateaggregatedstats
(
StatscollectionUpdateaggregatedstatsResource
, statscollectionUpdateaggregatedstats
, StatscollectionUpdateaggregatedstats
, sPayload
) where
import Network.Google.LatencyTest.Types
import Network.Google.Prelude
type StatscollectionUpdateaggregatedstatsResource =
"v2" :>
"statscollection" :>
"updateaggregatedstats" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AggregatedStats :>
Post '[JSON] AggregatedStatsReply
-- | RPC to update the new TCP stats.
--
-- /See:/ 'statscollectionUpdateaggregatedstats' smart constructor.
newtype StatscollectionUpdateaggregatedstats = StatscollectionUpdateaggregatedstats'
{ _sPayload :: AggregatedStats
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'StatscollectionUpdateaggregatedstats' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sPayload'
statscollectionUpdateaggregatedstats
:: AggregatedStats -- ^ 'sPayload'
-> StatscollectionUpdateaggregatedstats
statscollectionUpdateaggregatedstats pSPayload_ =
StatscollectionUpdateaggregatedstats'
{ _sPayload = pSPayload_
}
-- | Multipart request metadata.
sPayload :: Lens' StatscollectionUpdateaggregatedstats AggregatedStats
sPayload = lens _sPayload (\ s a -> s{_sPayload = a})
instance GoogleRequest
StatscollectionUpdateaggregatedstats where
type Rs StatscollectionUpdateaggregatedstats =
AggregatedStatsReply
type Scopes StatscollectionUpdateaggregatedstats =
'["https://www.googleapis.com/auth/monitoring.readonly"]
requestClient
StatscollectionUpdateaggregatedstats'{..}
= go (Just AltJSON) _sPayload latencyTestService
where go
= buildClient
(Proxy ::
Proxy StatscollectionUpdateaggregatedstatsResource)
mempty