content: {-# 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.Jobs.Projects.Tenants.Jobs.SearchForAlert
  -- 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)
  --
  -- Searches for jobs using the provided SearchJobsRequest. This API call is intended for the use case of targeting passive job seekers (for example, job seekers who have signed up to receive email alerts about potential job opportunities), it has different algorithmic adjustments that are designed to specifically target passive job seekers. This call constrains the visibility of jobs present in the database, and only returns jobs the caller has permission to search against.
  --
  -- /See:/ <https://cloud.google.com/talent-solution/job-search/docs/ Cloud Talent Solution API Reference> for @jobs.projects.tenants.jobs.searchForAlert@.
  module Gogol.Jobs.Projects.Tenants.Jobs.SearchForAlert
    ( -- * Resource
      JobsProjectsTenantsJobsSearchForAlertResource,
  
      -- ** Constructing a Request
      JobsProjectsTenantsJobsSearchForAlert (..),
      newJobsProjectsTenantsJobsSearchForAlert,
    )
  where
  
  import Gogol.Jobs.Types
  import Gogol.Prelude qualified as Core
  
  -- | A resource alias for @jobs.projects.tenants.jobs.searchForAlert@ method which the
  -- 'JobsProjectsTenantsJobsSearchForAlert' request conforms to.
  type JobsProjectsTenantsJobsSearchForAlertResource =
    "v4"
      Core.:> Core.Capture "parent" Core.Text
      Core.:> "jobs:searchForAlert"
      Core.:> Core.QueryParam "$.xgafv" Xgafv
      Core.:> Core.QueryParam "access_token" Core.Text
      Core.:> Core.QueryParam "callback" Core.Text
      Core.:> Core.QueryParam "uploadType" Core.Text
      Core.:> Core.QueryParam "upload_protocol" Core.Text
      Core.:> Core.QueryParam "alt" Core.AltJSON
      Core.:> Core.ReqBody '[Core.JSON] SearchJobsRequest
      Core.:> Core.Post '[Core.JSON] SearchJobsResponse
  
  -- | Searches for jobs using the provided SearchJobsRequest. This API call is intended for the use case of targeting passive job seekers (for example, job seekers who have signed up to receive email alerts about potential job opportunities), it has different algorithmic adjustments that are designed to specifically target passive job seekers. This call constrains the visibility of jobs present in the database, and only returns jobs the caller has permission to search against.
  --
  -- /See:/ 'newJobsProjectsTenantsJobsSearchForAlert' smart constructor.
  data JobsProjectsTenantsJobsSearchForAlert = JobsProjectsTenantsJobsSearchForAlert
    { -- | V1 error format.
      xgafv :: (Core.Maybe Xgafv),
      -- | OAuth access token.
      accessToken :: (Core.Maybe Core.Text),
      -- | JSONP
      callback :: (Core.Maybe Core.Text),
      -- | Required. The resource name of the tenant to search within. The format is \"projects\/{project/id}\/tenants\/{tenant/id}\". For example, \"projects\/foo\/tenants\/bar\".
      parent :: Core.Text,
      -- | Multipart request metadata.
      payload :: SearchJobsRequest,
      -- | 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 'JobsProjectsTenantsJobsSearchForAlert' with the minimum fields required to make a request.
  newJobsProjectsTenantsJobsSearchForAlert ::
    -- |  Required. The resource name of the tenant to search within. The format is \"projects\/{project/id}\/tenants\/{tenant/id}\". For example, \"projects\/foo\/tenants\/bar\". See 'parent'.
    Core.Text ->
    -- |  Multipart request metadata. See 'payload'.
    SearchJobsRequest ->
    JobsProjectsTenantsJobsSearchForAlert
  newJobsProjectsTenantsJobsSearchForAlert parent payload =
    JobsProjectsTenantsJobsSearchForAlert
      { xgafv = Core.Nothing,
        accessToken = Core.Nothing,
        callback = Core.Nothing,
        parent = parent,
        payload = payload,
        uploadType = Core.Nothing,
        uploadProtocol = Core.Nothing
      }
  
  instance Core.GoogleRequest JobsProjectsTenantsJobsSearchForAlert where
    type Rs JobsProjectsTenantsJobsSearchForAlert = SearchJobsResponse
    type
      Scopes JobsProjectsTenantsJobsSearchForAlert =
        '[CloudPlatform'FullControl, Jobs'FullControl]
    requestClient JobsProjectsTenantsJobsSearchForAlert {..} =
      go
        parent
        xgafv
        accessToken
        callback
        uploadType
        uploadProtocol
        (Core.Just Core.AltJSON)
        payload
        jobsService
      where
        go =
          Core.buildClient
            ( Core.Proxy ::
                Core.Proxy JobsProjectsTenantsJobsSearchForAlertResource
            )
            Core.mempty
  