{-# 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.Redis.Projects.Locations.Instances.Patch
(
ProjectsLocationsInstancesPatchResource
, projectsLocationsInstancesPatch
, ProjectsLocationsInstancesPatch
, plipXgafv
, plipUploadProtocol
, plipUpdateMask
, plipAccessToken
, plipUploadType
, plipPayload
, plipName
, plipCallback
) where
import Network.Google.Prelude
import Network.Google.Redis.Types
type ProjectsLocationsInstancesPatchResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Instance :> Patch '[JSON] Operation
data ProjectsLocationsInstancesPatch = ProjectsLocationsInstancesPatch'
{ _plipXgafv :: !(Maybe Xgafv)
, _plipUploadProtocol :: !(Maybe Text)
, _plipUpdateMask :: !(Maybe GFieldMask)
, _plipAccessToken :: !(Maybe Text)
, _plipUploadType :: !(Maybe Text)
, _plipPayload :: !Instance
, _plipName :: !Text
, _plipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsInstancesPatch
:: Instance
-> Text
-> ProjectsLocationsInstancesPatch
projectsLocationsInstancesPatch pPlipPayload_ pPlipName_ =
ProjectsLocationsInstancesPatch'
{ _plipXgafv = Nothing
, _plipUploadProtocol = Nothing
, _plipUpdateMask = Nothing
, _plipAccessToken = Nothing
, _plipUploadType = Nothing
, _plipPayload = pPlipPayload_
, _plipName = pPlipName_
, _plipCallback = Nothing
}
plipXgafv :: Lens' ProjectsLocationsInstancesPatch (Maybe Xgafv)
plipXgafv
= lens _plipXgafv (\ s a -> s{_plipXgafv = a})
plipUploadProtocol :: Lens' ProjectsLocationsInstancesPatch (Maybe Text)
plipUploadProtocol
= lens _plipUploadProtocol
(\ s a -> s{_plipUploadProtocol = a})
plipUpdateMask :: Lens' ProjectsLocationsInstancesPatch (Maybe GFieldMask)
plipUpdateMask
= lens _plipUpdateMask
(\ s a -> s{_plipUpdateMask = a})
plipAccessToken :: Lens' ProjectsLocationsInstancesPatch (Maybe Text)
plipAccessToken
= lens _plipAccessToken
(\ s a -> s{_plipAccessToken = a})
plipUploadType :: Lens' ProjectsLocationsInstancesPatch (Maybe Text)
plipUploadType
= lens _plipUploadType
(\ s a -> s{_plipUploadType = a})
plipPayload :: Lens' ProjectsLocationsInstancesPatch Instance
plipPayload
= lens _plipPayload (\ s a -> s{_plipPayload = a})
plipName :: Lens' ProjectsLocationsInstancesPatch Text
plipName = lens _plipName (\ s a -> s{_plipName = a})
plipCallback :: Lens' ProjectsLocationsInstancesPatch (Maybe Text)
plipCallback
= lens _plipCallback (\ s a -> s{_plipCallback = a})
instance GoogleRequest
ProjectsLocationsInstancesPatch where
type Rs ProjectsLocationsInstancesPatch = Operation
type Scopes ProjectsLocationsInstancesPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsInstancesPatch'{..}
= go _plipName _plipXgafv _plipUploadProtocol
_plipUpdateMask
_plipAccessToken
_plipUploadType
_plipCallback
(Just AltJSON)
_plipPayload
redisService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsInstancesPatchResource)
mempty