{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Directory.DomainAliases.Delete
(
DomainAliasesDeleteResource
, domainAliasesDelete
, DomainAliasesDelete
, dadDomainAliasName
, dadCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type DomainAliasesDeleteResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"domainaliases" :>
Capture "domainAliasName" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
-- | Deletes a Domain Alias of the customer.
--
-- /See:/ 'domainAliasesDelete' smart constructor.
data DomainAliasesDelete = DomainAliasesDelete'
{ _dadDomainAliasName :: !Text
, _dadCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'DomainAliasesDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dadDomainAliasName'
--
-- * 'dadCustomer'
domainAliasesDelete
:: Text -- ^ 'dadDomainAliasName'
-> Text -- ^ 'dadCustomer'
-> DomainAliasesDelete
domainAliasesDelete pDadDomainAliasName_ pDadCustomer_ =
DomainAliasesDelete'
{ _dadDomainAliasName = pDadDomainAliasName_
, _dadCustomer = pDadCustomer_
}
-- | Name of domain alias to be retrieved.
dadDomainAliasName :: Lens' DomainAliasesDelete Text
dadDomainAliasName
= lens _dadDomainAliasName
(\ s a -> s{_dadDomainAliasName = a})
-- | Immutable id of the Google Apps account.
dadCustomer :: Lens' DomainAliasesDelete Text
dadCustomer
= lens _dadCustomer (\ s a -> s{_dadCustomer = a})
instance GoogleRequest DomainAliasesDelete where
type Rs DomainAliasesDelete = ()
type Scopes DomainAliasesDelete =
'["https://www.googleapis.com/auth/admin.directory.domain"]
requestClient DomainAliasesDelete'{..}
= go _dadCustomer _dadDomainAliasName (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy DomainAliasesDeleteResource)
mempty