{-# 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.AppsLicensing.Licensing.LicenseAssignments.Insert
(
LicensingLicenseAssignmentsInsertResource,
LicensingLicenseAssignmentsInsert (..),
newLicensingLicenseAssignmentsInsert,
)
where
import Gogol.AppsLicensing.Types
import Gogol.Prelude qualified as Core
type LicensingLicenseAssignmentsInsertResource =
"apps"
Core.:> "licensing"
Core.:> "v1"
Core.:> "product"
Core.:> Core.Capture "productId" Core.Text
Core.:> "sku"
Core.:> Core.Capture "skuId" Core.Text
Core.:> "user"
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] LicenseAssignmentInsert
Core.:> Core.Post '[Core.JSON] LicenseAssignment
data LicensingLicenseAssignmentsInsert = LicensingLicenseAssignmentsInsert
{
LicensingLicenseAssignmentsInsert -> Maybe Xgafv
xgafv :: (Core.Maybe Xgafv),
LicensingLicenseAssignmentsInsert -> Maybe Text
accessToken :: (Core.Maybe Core.Text),
LicensingLicenseAssignmentsInsert -> Maybe Text
callback :: (Core.Maybe Core.Text),
LicensingLicenseAssignmentsInsert -> LicenseAssignmentInsert
payload :: LicenseAssignmentInsert,
LicensingLicenseAssignmentsInsert -> Text
productId :: Core.Text,
LicensingLicenseAssignmentsInsert -> Text
skuId :: Core.Text,
LicensingLicenseAssignmentsInsert -> Maybe Text
uploadType :: (Core.Maybe Core.Text),
LicensingLicenseAssignmentsInsert -> Maybe Text
uploadProtocol :: (Core.Maybe Core.Text)
}
deriving (LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool
(LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool)
-> (LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool)
-> Eq LicensingLicenseAssignmentsInsert
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool
== :: LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool
$c/= :: LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool
/= :: LicensingLicenseAssignmentsInsert
-> LicensingLicenseAssignmentsInsert -> Bool
Core.Eq, Int -> LicensingLicenseAssignmentsInsert -> ShowS
[LicensingLicenseAssignmentsInsert] -> ShowS
LicensingLicenseAssignmentsInsert -> String
(Int -> LicensingLicenseAssignmentsInsert -> ShowS)
-> (LicensingLicenseAssignmentsInsert -> String)
-> ([LicensingLicenseAssignmentsInsert] -> ShowS)
-> Show LicensingLicenseAssignmentsInsert
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LicensingLicenseAssignmentsInsert -> ShowS
showsPrec :: Int -> LicensingLicenseAssignmentsInsert -> ShowS
$cshow :: LicensingLicenseAssignmentsInsert -> String
show :: LicensingLicenseAssignmentsInsert -> String
$cshowList :: [LicensingLicenseAssignmentsInsert] -> ShowS
showList :: [LicensingLicenseAssignmentsInsert] -> ShowS
Core.Show, (forall x.
LicensingLicenseAssignmentsInsert
-> Rep LicensingLicenseAssignmentsInsert x)
-> (forall x.
Rep LicensingLicenseAssignmentsInsert x
-> LicensingLicenseAssignmentsInsert)
-> Generic LicensingLicenseAssignmentsInsert
forall x.
Rep LicensingLicenseAssignmentsInsert x
-> LicensingLicenseAssignmentsInsert
forall x.
LicensingLicenseAssignmentsInsert
-> Rep LicensingLicenseAssignmentsInsert x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
LicensingLicenseAssignmentsInsert
-> Rep LicensingLicenseAssignmentsInsert x
from :: forall x.
LicensingLicenseAssignmentsInsert
-> Rep LicensingLicenseAssignmentsInsert x
$cto :: forall x.
Rep LicensingLicenseAssignmentsInsert x
-> LicensingLicenseAssignmentsInsert
to :: forall x.
Rep LicensingLicenseAssignmentsInsert x
-> LicensingLicenseAssignmentsInsert
Core.Generic)
newLicensingLicenseAssignmentsInsert ::
LicenseAssignmentInsert ->
Core.Text ->
Core.Text ->
LicensingLicenseAssignmentsInsert
newLicensingLicenseAssignmentsInsert :: LicenseAssignmentInsert
-> Text -> Text -> LicensingLicenseAssignmentsInsert
newLicensingLicenseAssignmentsInsert LicenseAssignmentInsert
payload Text
productId Text
skuId =
LicensingLicenseAssignmentsInsert
{ xgafv :: Maybe Xgafv
xgafv = Maybe Xgafv
forall a. Maybe a
Core.Nothing,
accessToken :: Maybe Text
accessToken = Maybe Text
forall a. Maybe a
Core.Nothing,
callback :: Maybe Text
callback = Maybe Text
forall a. Maybe a
Core.Nothing,
payload :: LicenseAssignmentInsert
payload = LicenseAssignmentInsert
payload,
productId :: Text
productId = Text
productId,
skuId :: Text
skuId = Text
skuId,
uploadType :: Maybe Text
uploadType = Maybe Text
forall a. Maybe a
Core.Nothing,
uploadProtocol :: Maybe Text
uploadProtocol = Maybe Text
forall a. Maybe a
Core.Nothing
}
instance Core.GoogleRequest LicensingLicenseAssignmentsInsert where
type Rs LicensingLicenseAssignmentsInsert = LicenseAssignment
type Scopes LicensingLicenseAssignmentsInsert = '[Apps'Licensing]
requestClient :: LicensingLicenseAssignmentsInsert
-> GClient (Rs LicensingLicenseAssignmentsInsert)
requestClient LicensingLicenseAssignmentsInsert {Maybe Text
Maybe Xgafv
Text
LicenseAssignmentInsert
xgafv :: LicensingLicenseAssignmentsInsert -> Maybe Xgafv
accessToken :: LicensingLicenseAssignmentsInsert -> Maybe Text
callback :: LicensingLicenseAssignmentsInsert -> Maybe Text
payload :: LicensingLicenseAssignmentsInsert -> LicenseAssignmentInsert
productId :: LicensingLicenseAssignmentsInsert -> Text
skuId :: LicensingLicenseAssignmentsInsert -> Text
uploadType :: LicensingLicenseAssignmentsInsert -> Maybe Text
uploadProtocol :: LicensingLicenseAssignmentsInsert -> Maybe Text
xgafv :: Maybe Xgafv
accessToken :: Maybe Text
callback :: Maybe Text
payload :: LicenseAssignmentInsert
productId :: Text
skuId :: Text
uploadType :: Maybe Text
uploadProtocol :: Maybe Text
..} =
Text
-> Text
-> Maybe Xgafv
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AltJSON
-> LicenseAssignmentInsert
-> ServiceConfig
-> GClient LicenseAssignment
go
Text
productId
Text
skuId
Maybe Xgafv
xgafv
Maybe Text
accessToken
Maybe Text
callback
Maybe Text
uploadType
Maybe Text
uploadProtocol
(AltJSON -> Maybe AltJSON
forall a. a -> Maybe a
Core.Just AltJSON
Core.AltJSON)
LicenseAssignmentInsert
payload
ServiceConfig
appsLicensingService
where
go :: Fn LicensingLicenseAssignmentsInsertResource
go =
Proxy LicensingLicenseAssignmentsInsertResource
-> Request -> Fn LicensingLicenseAssignmentsInsertResource
forall {k} (fn :: k).
GoogleClient fn =>
Proxy fn -> Request -> Fn fn
Core.buildClient
( Proxy LicensingLicenseAssignmentsInsertResource
forall {k} (t :: k). Proxy t
Core.Proxy ::
Core.Proxy LicensingLicenseAssignmentsInsertResource
)
Request
forall a. Monoid a => a
Core.mempty