{-# 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.Mirror.Subscriptions.Update
(
SubscriptionsUpdateResource
, subscriptionsUpdate
, SubscriptionsUpdate
, suPayload
, suId
) where
import Network.Google.Mirror.Types
import Network.Google.Prelude
type SubscriptionsUpdateResource =
"mirror" :>
"v1" :>
"subscriptions" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Subscription :>
Put '[JSON] Subscription
data SubscriptionsUpdate = SubscriptionsUpdate'
{ _suPayload :: !Subscription
, _suId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsUpdate
:: Subscription
-> Text
-> SubscriptionsUpdate
subscriptionsUpdate pSuPayload_ pSuId_ =
SubscriptionsUpdate'
{ _suPayload = pSuPayload_
, _suId = pSuId_
}
suPayload :: Lens' SubscriptionsUpdate Subscription
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a})
suId :: Lens' SubscriptionsUpdate Text
suId = lens _suId (\ s a -> s{_suId = a})
instance GoogleRequest SubscriptionsUpdate where
type Rs SubscriptionsUpdate = Subscription
type Scopes SubscriptionsUpdate =
'["https://www.googleapis.com/auth/glass.timeline"]
requestClient SubscriptionsUpdate'{..}
= go _suId (Just AltJSON) _suPayload mirrorService
where go
= buildClient
(Proxy :: Proxy SubscriptionsUpdateResource)
mempty