{-# 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.Users.Watch
(
UsersWatchResource
, usersWatch
, UsersWatch
, uwEvent
, uwOrderBy
, uwViewType
, uwCustomFieldMask
, uwDomain
, uwShowDeleted
, uwPayload
, uwSortOrder
, uwCustomer
, uwQuery
, uwProjection
, uwPageToken
, uwMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type UsersWatchResource =
"admin" :>
"directory" :>
"v1" :>
"users" :>
"watch" :>
QueryParam "event" UsersWatchEvent :>
QueryParam "orderBy" UsersWatchOrderBy :>
QueryParam "viewType" UsersWatchViewType :>
QueryParam "customFieldMask" Text :>
QueryParam "domain" Text :>
QueryParam "showDeleted" Text :>
QueryParam "sortOrder" UsersWatchSortOrder :>
QueryParam "customer" Text :>
QueryParam "query" Text :>
QueryParam "projection" UsersWatchProjection :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Channel :>
Post '[JSON] Channel
data UsersWatch = UsersWatch'
{ _uwEvent :: !(Maybe UsersWatchEvent)
, _uwOrderBy :: !(Maybe UsersWatchOrderBy)
, _uwViewType :: !UsersWatchViewType
, _uwCustomFieldMask :: !(Maybe Text)
, _uwDomain :: !(Maybe Text)
, _uwShowDeleted :: !(Maybe Text)
, _uwPayload :: !Channel
, _uwSortOrder :: !(Maybe UsersWatchSortOrder)
, _uwCustomer :: !(Maybe Text)
, _uwQuery :: !(Maybe Text)
, _uwProjection :: !UsersWatchProjection
, _uwPageToken :: !(Maybe Text)
, _uwMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
usersWatch
:: Channel
-> UsersWatch
usersWatch pUwPayload_ =
UsersWatch'
{ _uwEvent = Nothing
, _uwOrderBy = Nothing
, _uwViewType = UWVTAdminView
, _uwCustomFieldMask = Nothing
, _uwDomain = Nothing
, _uwShowDeleted = Nothing
, _uwPayload = pUwPayload_
, _uwSortOrder = Nothing
, _uwCustomer = Nothing
, _uwQuery = Nothing
, _uwProjection = UWPBasic
, _uwPageToken = Nothing
, _uwMaxResults = Nothing
}
uwEvent :: Lens' UsersWatch (Maybe UsersWatchEvent)
uwEvent = lens _uwEvent (\ s a -> s{_uwEvent = a})
uwOrderBy :: Lens' UsersWatch (Maybe UsersWatchOrderBy)
uwOrderBy
= lens _uwOrderBy (\ s a -> s{_uwOrderBy = a})
uwViewType :: Lens' UsersWatch UsersWatchViewType
uwViewType
= lens _uwViewType (\ s a -> s{_uwViewType = a})
uwCustomFieldMask :: Lens' UsersWatch (Maybe Text)
uwCustomFieldMask
= lens _uwCustomFieldMask
(\ s a -> s{_uwCustomFieldMask = a})
uwDomain :: Lens' UsersWatch (Maybe Text)
uwDomain = lens _uwDomain (\ s a -> s{_uwDomain = a})
uwShowDeleted :: Lens' UsersWatch (Maybe Text)
uwShowDeleted
= lens _uwShowDeleted
(\ s a -> s{_uwShowDeleted = a})
uwPayload :: Lens' UsersWatch Channel
uwPayload
= lens _uwPayload (\ s a -> s{_uwPayload = a})
uwSortOrder :: Lens' UsersWatch (Maybe UsersWatchSortOrder)
uwSortOrder
= lens _uwSortOrder (\ s a -> s{_uwSortOrder = a})
uwCustomer :: Lens' UsersWatch (Maybe Text)
uwCustomer
= lens _uwCustomer (\ s a -> s{_uwCustomer = a})
uwQuery :: Lens' UsersWatch (Maybe Text)
uwQuery = lens _uwQuery (\ s a -> s{_uwQuery = a})
uwProjection :: Lens' UsersWatch UsersWatchProjection
uwProjection
= lens _uwProjection (\ s a -> s{_uwProjection = a})
uwPageToken :: Lens' UsersWatch (Maybe Text)
uwPageToken
= lens _uwPageToken (\ s a -> s{_uwPageToken = a})
uwMaxResults :: Lens' UsersWatch (Maybe Int32)
uwMaxResults
= lens _uwMaxResults (\ s a -> s{_uwMaxResults = a})
. mapping _Coerce
instance GoogleRequest UsersWatch where
type Rs UsersWatch = Channel
type Scopes UsersWatch =
'["https://www.googleapis.com/auth/admin.directory.user",
"https://www.googleapis.com/auth/admin.directory.user.readonly"]
requestClient UsersWatch'{..}
= go _uwEvent _uwOrderBy (Just _uwViewType)
_uwCustomFieldMask
_uwDomain
_uwShowDeleted
_uwSortOrder
_uwCustomer
_uwQuery
(Just _uwProjection)
_uwPageToken
_uwMaxResults
(Just AltJSON)
_uwPayload
directoryService
where go
= buildClient (Proxy :: Proxy UsersWatchResource)
mempty