{-# 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.StartReplica
(
InstancesStartReplicaResource
, instancesStartReplica
, InstancesStartReplica
, insProject
, insInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesStartReplicaResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"startReplica" :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesStartReplica = InstancesStartReplica'
{ _insProject :: !Text
, _insInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesStartReplica
:: Text
-> Text
-> InstancesStartReplica
instancesStartReplica pInsProject_ pInsInstance_ =
InstancesStartReplica'
{ _insProject = pInsProject_
, _insInstance = pInsInstance_
}
insProject :: Lens' InstancesStartReplica Text
insProject
= lens _insProject (\ s a -> s{_insProject = a})
insInstance :: Lens' InstancesStartReplica Text
insInstance
= lens _insInstance (\ s a -> s{_insInstance = a})
instance GoogleRequest InstancesStartReplica where
type Rs InstancesStartReplica = Operation
type Scopes InstancesStartReplica =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesStartReplica'{..}
= go _insProject _insInstance (Just AltJSON)
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesStartReplicaResource)
mempty