{-# 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.SQL.Instances.StopReplica
(
InstancesStopReplicaResource
, instancesStopReplica
, InstancesStopReplica
, isrProject
, isrInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesStopReplicaResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"stopReplica" :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesStopReplica = InstancesStopReplica'
{ _isrProject :: !Text
, _isrInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesStopReplica
:: Text
-> Text
-> InstancesStopReplica
instancesStopReplica pIsrProject_ pIsrInstance_ =
InstancesStopReplica'
{ _isrProject = pIsrProject_
, _isrInstance = pIsrInstance_
}
isrProject :: Lens' InstancesStopReplica Text
isrProject
= lens _isrProject (\ s a -> s{_isrProject = a})
isrInstance :: Lens' InstancesStopReplica Text
isrInstance
= lens _isrInstance (\ s a -> s{_isrInstance = a})
instance GoogleRequest InstancesStopReplica where
type Rs InstancesStopReplica = Operation
type Scopes InstancesStopReplica =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesStopReplica'{..}
= go _isrProject _isrInstance (Just AltJSON)
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesStopReplicaResource)
mempty