gogol-android-enterprise-1.0.0: gen/Gogol/AndroidEnterprise/Enterprises/PullNotificationSet.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- |
-- Module : Gogol.AndroidEnterprise.Enterprises.PullNotificationSet
-- Copyright : (c) 2015-2025 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay+gogol@gmail.com>
-- Toni Cebrián <toni@tonicebrian.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub\/Sub system policy. Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.
--
-- /See:/ <https://developers.google.com/android/work/play/emm-api Google Play EMM API Reference> for @androidenterprise.enterprises.pullNotificationSet@.
module Gogol.AndroidEnterprise.Enterprises.PullNotificationSet
( -- * Resource
AndroidEnterpriseEnterprisesPullNotificationSetResource,
-- ** Constructing a Request
AndroidEnterpriseEnterprisesPullNotificationSet (..),
newAndroidEnterpriseEnterprisesPullNotificationSet,
)
where
import Gogol.AndroidEnterprise.Types
import Gogol.Prelude qualified as Core
-- | A resource alias for @androidenterprise.enterprises.pullNotificationSet@ method which the
-- 'AndroidEnterpriseEnterprisesPullNotificationSet' request conforms to.
type AndroidEnterpriseEnterprisesPullNotificationSetResource =
"androidenterprise"
Core.:> "v1"
Core.:> "enterprises"
Core.:> "pullNotificationSet"
Core.:> Core.QueryParam "$.xgafv" Xgafv
Core.:> Core.QueryParam "access_token" Core.Text
Core.:> Core.QueryParam "callback" Core.Text
Core.:> Core.QueryParam
"requestMode"
EnterprisesPullNotificationSetRequestMode
Core.:> Core.QueryParam "uploadType" Core.Text
Core.:> Core.QueryParam "upload_protocol" Core.Text
Core.:> Core.QueryParam "alt" Core.AltJSON
Core.:> Core.Post '[Core.JSON] NotificationSet
-- | Pulls and returns a notification set for the enterprises associated with the service account authenticated for the request. The notification set may be empty if no notification are pending. A notification set returned needs to be acknowledged within 20 seconds by calling Enterprises.AcknowledgeNotificationSet, unless the notification set is empty. Notifications that are not acknowledged within the 20 seconds will eventually be included again in the response to another PullNotificationSet request, and those that are never acknowledged will ultimately be deleted according to the Google Cloud Platform Pub\/Sub system policy. Multiple requests might be performed concurrently to retrieve notifications, in which case the pending notifications (if any) will be split among each caller, if any are pending. If no notifications are present, an empty notification list is returned. Subsequent requests may return more notifications once they become available.
--
-- /See:/ 'newAndroidEnterpriseEnterprisesPullNotificationSet' smart constructor.
data AndroidEnterpriseEnterprisesPullNotificationSet = AndroidEnterpriseEnterprisesPullNotificationSet
{ -- | V1 error format.
xgafv :: (Core.Maybe Xgafv),
-- | OAuth access token.
accessToken :: (Core.Maybe Core.Text),
-- | JSONP
callback :: (Core.Maybe Core.Text),
-- | The request mode for pulling notifications. Specifying waitForNotifications will cause the request to block and wait until one or more notifications are present, or return an empty notification list if no notifications are present after some time. Specifying returnImmediately will cause the request to immediately return the pending notifications, or an empty list if no notifications are present. If omitted, defaults to waitForNotifications.
requestMode :: (Core.Maybe EnterprisesPullNotificationSetRequestMode),
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
uploadType :: (Core.Maybe Core.Text),
-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
uploadProtocol :: (Core.Maybe Core.Text)
}
deriving (Core.Eq, Core.Show, Core.Generic)
-- | Creates a value of 'AndroidEnterpriseEnterprisesPullNotificationSet' with the minimum fields required to make a request.
newAndroidEnterpriseEnterprisesPullNotificationSet ::
AndroidEnterpriseEnterprisesPullNotificationSet
newAndroidEnterpriseEnterprisesPullNotificationSet =
AndroidEnterpriseEnterprisesPullNotificationSet
{ xgafv =
Core.Nothing,
accessToken = Core.Nothing,
callback = Core.Nothing,
requestMode = Core.Nothing,
uploadType = Core.Nothing,
uploadProtocol = Core.Nothing
}
instance
Core.GoogleRequest
AndroidEnterpriseEnterprisesPullNotificationSet
where
type
Rs AndroidEnterpriseEnterprisesPullNotificationSet =
NotificationSet
type
Scopes AndroidEnterpriseEnterprisesPullNotificationSet =
'[Androidenterprise'FullControl]
requestClient AndroidEnterpriseEnterprisesPullNotificationSet {..} =
go
xgafv
accessToken
callback
requestMode
uploadType
uploadProtocol
(Core.Just Core.AltJSON)
androidEnterpriseService
where
go =
Core.buildClient
( Core.Proxy ::
Core.Proxy AndroidEnterpriseEnterprisesPullNotificationSetResource
)
Core.mempty