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.ResourceManager.Cloudresourcemanager.Projects.Delete
  -- 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)
  --
  -- Marks the project identified by the specified @name@ (for example, @projects\/415104041262@) for deletion. This method will only affect the project if it has a lifecycle state of ACTIVE. This method changes the Project\'s lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the project with GetProject, and the project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the project is not retrievable by the GetProject, ListProjects, and SearchProjects methods. The caller must have @resourcemanager.projects.delete@ permissions for this project.
  --
  -- /See:/ <https://cloud.google.com/resource-manager Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.delete@.
  module Gogol.ResourceManager.Cloudresourcemanager.Projects.Delete
    ( -- * Resource
      CloudresourcemanagerProjectsDeleteResource,
  
      -- ** Constructing a Request
      CloudresourcemanagerProjectsDelete (..),
      newCloudresourcemanagerProjectsDelete,
    )
  where
  
  import Gogol.Prelude qualified as Core
  import Gogol.ResourceManager.Types
  
  -- | A resource alias for @cloudresourcemanager.projects.delete@ method which the
  -- 'CloudresourcemanagerProjectsDelete' request conforms to.
  type CloudresourcemanagerProjectsDeleteResource =
    "v3"
      Core.:> Core.Capture "name" Core.Text
      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.Delete '[Core.JSON] Operation
  
  -- | Marks the project identified by the specified @name@ (for example, @projects\/415104041262@) for deletion. This method will only affect the project if it has a lifecycle state of ACTIVE. This method changes the Project\'s lifecycle state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified time, at which point the Project is no longer accessible. Until the deletion completes, you can check the lifecycle state checked by retrieving the project with GetProject, and the project remains visible to ListProjects. However, you cannot update the project. After the deletion completes, the project is not retrievable by the GetProject, ListProjects, and SearchProjects methods. The caller must have @resourcemanager.projects.delete@ permissions for this project.
  --
  -- /See:/ 'newCloudresourcemanagerProjectsDelete' smart constructor.
  data CloudresourcemanagerProjectsDelete = CloudresourcemanagerProjectsDelete
    { -- | V1 error format.
      xgafv :: (Core.Maybe Xgafv),
      -- | OAuth access token.
      accessToken :: (Core.Maybe Core.Text),
      -- | JSONP
      callback :: (Core.Maybe Core.Text),
      -- | Required. The name of the Project (for example, @projects\/415104041262@).
      name :: Core.Text,
      -- | 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 'CloudresourcemanagerProjectsDelete' with the minimum fields required to make a request.
  newCloudresourcemanagerProjectsDelete ::
    -- |  Required. The name of the Project (for example, @projects\/415104041262@). See 'name'.
    Core.Text ->
    CloudresourcemanagerProjectsDelete
  newCloudresourcemanagerProjectsDelete name =
    CloudresourcemanagerProjectsDelete
      { xgafv = Core.Nothing,
        accessToken = Core.Nothing,
        callback = Core.Nothing,
        name = name,
        uploadType = Core.Nothing,
        uploadProtocol = Core.Nothing
      }
  
  instance Core.GoogleRequest CloudresourcemanagerProjectsDelete where
    type Rs CloudresourcemanagerProjectsDelete = Operation
    type
      Scopes CloudresourcemanagerProjectsDelete =
        '[CloudPlatform'FullControl]
    requestClient CloudresourcemanagerProjectsDelete {..} =
      go
        name
        xgafv
        accessToken
        callback
        uploadType
        uploadProtocol
        (Core.Just Core.AltJSON)
        resourceManagerService
      where
        go =
          Core.buildClient
            ( Core.Proxy ::
                Core.Proxy CloudresourcemanagerProjectsDeleteResource
            )
            Core.mempty
  