{-# 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.File.Projects.Locations.Instances.Create
(
ProjectsLocationsInstancesCreateResource
, projectsLocationsInstancesCreate
, ProjectsLocationsInstancesCreate
, plicParent
, plicInstanceId
, plicXgafv
, plicUploadProtocol
, plicAccessToken
, plicUploadType
, plicPayload
, plicCallback
) where
import Network.Google.File.Types
import Network.Google.Prelude
type ProjectsLocationsInstancesCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"instances" :>
QueryParam "instanceId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Instance :> Post '[JSON] Operation
data ProjectsLocationsInstancesCreate = ProjectsLocationsInstancesCreate'
{ _plicParent :: !Text
, _plicInstanceId :: !(Maybe Text)
, _plicXgafv :: !(Maybe Xgafv)
, _plicUploadProtocol :: !(Maybe Text)
, _plicAccessToken :: !(Maybe Text)
, _plicUploadType :: !(Maybe Text)
, _plicPayload :: !Instance
, _plicCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsLocationsInstancesCreate
:: Text
-> Instance
-> ProjectsLocationsInstancesCreate
projectsLocationsInstancesCreate pPlicParent_ pPlicPayload_ =
ProjectsLocationsInstancesCreate'
{ _plicParent = pPlicParent_
, _plicInstanceId = Nothing
, _plicXgafv = Nothing
, _plicUploadProtocol = Nothing
, _plicAccessToken = Nothing
, _plicUploadType = Nothing
, _plicPayload = pPlicPayload_
, _plicCallback = Nothing
}
plicParent :: Lens' ProjectsLocationsInstancesCreate Text
plicParent
= lens _plicParent (\ s a -> s{_plicParent = a})
plicInstanceId :: Lens' ProjectsLocationsInstancesCreate (Maybe Text)
plicInstanceId
= lens _plicInstanceId
(\ s a -> s{_plicInstanceId = a})
plicXgafv :: Lens' ProjectsLocationsInstancesCreate (Maybe Xgafv)
plicXgafv
= lens _plicXgafv (\ s a -> s{_plicXgafv = a})
plicUploadProtocol :: Lens' ProjectsLocationsInstancesCreate (Maybe Text)
plicUploadProtocol
= lens _plicUploadProtocol
(\ s a -> s{_plicUploadProtocol = a})
plicAccessToken :: Lens' ProjectsLocationsInstancesCreate (Maybe Text)
plicAccessToken
= lens _plicAccessToken
(\ s a -> s{_plicAccessToken = a})
plicUploadType :: Lens' ProjectsLocationsInstancesCreate (Maybe Text)
plicUploadType
= lens _plicUploadType
(\ s a -> s{_plicUploadType = a})
plicPayload :: Lens' ProjectsLocationsInstancesCreate Instance
plicPayload
= lens _plicPayload (\ s a -> s{_plicPayload = a})
plicCallback :: Lens' ProjectsLocationsInstancesCreate (Maybe Text)
plicCallback
= lens _plicCallback (\ s a -> s{_plicCallback = a})
instance GoogleRequest
ProjectsLocationsInstancesCreate where
type Rs ProjectsLocationsInstancesCreate = Operation
type Scopes ProjectsLocationsInstancesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsLocationsInstancesCreate'{..}
= go _plicParent _plicInstanceId _plicXgafv
_plicUploadProtocol
_plicAccessToken
_plicUploadType
_plicCallback
(Just AltJSON)
_plicPayload
fileService
where go
= buildClient
(Proxy ::
Proxy ProjectsLocationsInstancesCreateResource)
mempty