{-# 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.Compute.Images.Deprecate
(
ImagesDeprecateResource
, imagesDeprecate
, ImagesDeprecate
, id1RequestId
, id1Image
, id1Project
, id1Payload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type ImagesDeprecateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"images" :>
Capture "image" Text :>
"deprecate" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DeprecationStatus :>
Post '[JSON] Operation
data ImagesDeprecate = ImagesDeprecate'
{ _id1RequestId :: !(Maybe Text)
, _id1Image :: !Text
, _id1Project :: !Text
, _id1Payload :: !DeprecationStatus
} deriving (Eq,Show,Data,Typeable,Generic)
imagesDeprecate
:: Text
-> Text
-> DeprecationStatus
-> ImagesDeprecate
imagesDeprecate pId1Image_ pId1Project_ pId1Payload_ =
ImagesDeprecate'
{ _id1RequestId = Nothing
, _id1Image = pId1Image_
, _id1Project = pId1Project_
, _id1Payload = pId1Payload_
}
id1RequestId :: Lens' ImagesDeprecate (Maybe Text)
id1RequestId
= lens _id1RequestId (\ s a -> s{_id1RequestId = a})
id1Image :: Lens' ImagesDeprecate Text
id1Image = lens _id1Image (\ s a -> s{_id1Image = a})
id1Project :: Lens' ImagesDeprecate Text
id1Project
= lens _id1Project (\ s a -> s{_id1Project = a})
id1Payload :: Lens' ImagesDeprecate DeprecationStatus
id1Payload
= lens _id1Payload (\ s a -> s{_id1Payload = a})
instance GoogleRequest ImagesDeprecate where
type Rs ImagesDeprecate = Operation
type Scopes ImagesDeprecate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient ImagesDeprecate'{..}
= go _id1Project _id1Image _id1RequestId
(Just AltJSON)
_id1Payload
computeService
where go
= buildClient
(Proxy :: Proxy ImagesDeprecateResource)
mempty