{-# 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.Directory.Resources.Calendars.Get
(
ResourcesCalendarsGetResource
, resourcesCalendarsGet
, ResourcesCalendarsGet
, rcgCustomer
, rcgCalendarResourceId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesCalendarsGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"calendars" :>
Capture "calendarResourceId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] CalendarResource
data ResourcesCalendarsGet = ResourcesCalendarsGet'
{ _rcgCustomer :: !Text
, _rcgCalendarResourceId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesCalendarsGet
:: Text
-> Text
-> ResourcesCalendarsGet
resourcesCalendarsGet pRcgCustomer_ pRcgCalendarResourceId_ =
ResourcesCalendarsGet'
{ _rcgCustomer = pRcgCustomer_
, _rcgCalendarResourceId = pRcgCalendarResourceId_
}
rcgCustomer :: Lens' ResourcesCalendarsGet Text
rcgCustomer
= lens _rcgCustomer (\ s a -> s{_rcgCustomer = a})
rcgCalendarResourceId :: Lens' ResourcesCalendarsGet Text
rcgCalendarResourceId
= lens _rcgCalendarResourceId
(\ s a -> s{_rcgCalendarResourceId = a})
instance GoogleRequest ResourcesCalendarsGet where
type Rs ResourcesCalendarsGet = CalendarResource
type Scopes ResourcesCalendarsGet =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar",
"https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"]
requestClient ResourcesCalendarsGet'{..}
= go _rcgCustomer _rcgCalendarResourceId
(Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesCalendarsGetResource)
mempty