# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# 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       :  . ShoppingContent . Content . Freelistingsprogram . Get
  Copyright    : ( c ) 2015 - 2022  
  License      : Mozilla Public License , v. 2.0 .
  Maintainer   :   < brendan.g.hay+ >
-- Stability   : auto-generated
  Portability : non - portable ( GHC extensions )
--
-- Retrieves the status and review eligibility for the free listing program.
--
  /See:/ <   API for Shopping Reference > for @content.freelistingsprogram.get@.
module Gogol.ShoppingContent.Content.Freelistingsprogram.Get
  ( -- * Resource
    ContentFreelistingsprogramGetResource,

    -- ** Constructing a Request
    ContentFreelistingsprogramGet (..),
    newContentFreelistingsprogramGet,
  )
where

import qualified Gogol.Prelude as Core
import Gogol.ShoppingContent.Types

-- | A resource alias for @content.freelistingsprogram.get@ method which the
-- 'ContentFreelistingsprogramGet' request conforms to.
type ContentFreelistingsprogramGetResource =
  "content"
    Core.:> "v2.1"
    Core.:> Core.Capture "merchantId" Core.Int64
    Core.:> "freelistingsprogram"
    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.Get '[Core.JSON] FreeListingsProgramStatus

-- | Retrieves the status and review eligibility for the free listing program.
--
-- /See:/ 'newContentFreelistingsprogramGet' smart constructor.
data ContentFreelistingsprogramGet = ContentFreelistingsprogramGet
  { -- | V1 error format.
    xgafv :: (Core.Maybe Xgafv),
    -- | OAuth access token.
    accessToken :: (Core.Maybe Core.Text),
  | JSONP
    callback :: (Core.Maybe Core.Text),
    -- | Required. The ID of the account.
    merchantId :: Core.Int64,
  | 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 'ContentFreelistingsprogramGet' with the minimum fields required to make a request.
newContentFreelistingsprogramGet ::
  -- |  Required. The ID of the account. See 'merchantId'.
  Core.Int64 ->
  ContentFreelistingsprogramGet
newContentFreelistingsprogramGet merchantId =
  ContentFreelistingsprogramGet
    { xgafv = Core.Nothing,
      accessToken = Core.Nothing,
      callback = Core.Nothing,
      merchantId = merchantId,
      uploadType = Core.Nothing,
      uploadProtocol = Core.Nothing
    }

instance
  Core.GoogleRequest
    ContentFreelistingsprogramGet
  where
  type
    Rs ContentFreelistingsprogramGet =
      FreeListingsProgramStatus
  type
    Scopes ContentFreelistingsprogramGet =
      '[Content'FullControl]
  requestClient ContentFreelistingsprogramGet {..} =
    go
      merchantId
      xgafv
      accessToken
      callback
      uploadType
      uploadProtocol
      (Core.Just Core.AltJSON)
      shoppingContentService
    where
      go =
        Core.buildClient
          ( Core.Proxy ::
              Core.Proxy ContentFreelistingsprogramGetResource
          )
          Core.mempty

# LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
 |
 Stability   : auto-generated

 Retrieves the status and review eligibility for the free listing program.

 * Resource
 ** Constructing a Request
 | A resource alias for @content.freelistingsprogram.get@ method which the
 'ContentFreelistingsprogramGet' request conforms to.
 | Retrieves the status and review eligibility for the free listing program.

 /See:/ 'newContentFreelistingsprogramGet' smart constructor.
 | V1 error format.
 | OAuth access token.
 | Required. The ID of the account.
 | Upload protocol for media (e.g. \"raw\", \"multipart\").
 | Creates a value of 'ContentFreelistingsprogramGet' with the minimum fields required to make a request.
 |  Required. The ID of the account. See 'merchantId'.
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# 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       :  . ShoppingContent . Content . Freelistingsprogram . Get
  Copyright    : ( c ) 2015 - 2022  
  License      : Mozilla Public License , v. 2.0 .
  Maintainer   :   < brendan.g.hay+ >
  Portability : non - portable ( GHC extensions )
  /See:/ <   API for Shopping Reference > for @content.freelistingsprogram.get@.
module Gogol.ShoppingContent.Content.Freelistingsprogram.Get
    ContentFreelistingsprogramGetResource,

    ContentFreelistingsprogramGet (..),
    newContentFreelistingsprogramGet,
  )
where

import qualified Gogol.Prelude as Core
import Gogol.ShoppingContent.Types

type ContentFreelistingsprogramGetResource =
  "content"
    Core.:> "v2.1"
    Core.:> Core.Capture "merchantId" Core.Int64
    Core.:> "freelistingsprogram"
    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.Get '[Core.JSON] FreeListingsProgramStatus

data ContentFreelistingsprogramGet = ContentFreelistingsprogramGet
    xgafv :: (Core.Maybe Xgafv),
    accessToken :: (Core.Maybe Core.Text),
  | JSONP
    callback :: (Core.Maybe Core.Text),
    merchantId :: Core.Int64,
  | Legacy upload protocol for media ( e.g. \"media\ " , \"multipart\ " ) .
    uploadType :: (Core.Maybe Core.Text),
    uploadProtocol :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

newContentFreelistingsprogramGet ::
  Core.Int64 ->
  ContentFreelistingsprogramGet
newContentFreelistingsprogramGet merchantId =
  ContentFreelistingsprogramGet
    { xgafv = Core.Nothing,
      accessToken = Core.Nothing,
      callback = Core.Nothing,
      merchantId = merchantId,
      uploadType = Core.Nothing,
      uploadProtocol = Core.Nothing
    }

instance
  Core.GoogleRequest
    ContentFreelistingsprogramGet
  where
  type
    Rs ContentFreelistingsprogramGet =
      FreeListingsProgramStatus
  type
    Scopes ContentFreelistingsprogramGet =
      '[Content'FullControl]
  requestClient ContentFreelistingsprogramGet {..} =
    go
      merchantId
      xgafv
      accessToken
      callback
      uploadType
      uploadProtocol
      (Core.Just Core.AltJSON)
      shoppingContentService
    where
      go =
        Core.buildClient
          ( Core.Proxy ::
              Core.Proxy ContentFreelistingsprogramGetResource
          )
          Core.mempty
