{-# 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.Insert
(
SubscriptionsInsertResource
, subscriptionsInsert
, SubscriptionsInsert
, siPayload
) where
import Network.Google.Mirror.Types
import Network.Google.Prelude
type SubscriptionsInsertResource =
"mirror" :>
"v1" :>
"subscriptions" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Subscription :>
Post '[JSON] Subscription
newtype SubscriptionsInsert = SubscriptionsInsert'
{ _siPayload :: Subscription
} deriving (Eq,Show,Data,Typeable,Generic)
subscriptionsInsert
:: Subscription
-> SubscriptionsInsert
subscriptionsInsert pSiPayload_ =
SubscriptionsInsert'
{ _siPayload = pSiPayload_
}
siPayload :: Lens' SubscriptionsInsert Subscription
siPayload
= lens _siPayload (\ s a -> s{_siPayload = a})
instance GoogleRequest SubscriptionsInsert where
type Rs SubscriptionsInsert = Subscription
type Scopes SubscriptionsInsert =
'["https://www.googleapis.com/auth/glass.timeline"]
requestClient SubscriptionsInsert'{..}
= go (Just AltJSON) _siPayload mirrorService
where go
= buildClient
(Proxy :: Proxy SubscriptionsInsertResource)
mempty