diff options
Diffstat (limited to 'gen/Network/Google/Resource/Dataflow/Projects/Snapshots')
-rw-r--r-- | gen/Network/Google/Resource/Dataflow/Projects/Snapshots/Get.hs | 180 | ||||
-rw-r--r-- | gen/Network/Google/Resource/Dataflow/Projects/Snapshots/List.hs | 167 |
2 files changed, 347 insertions, 0 deletions
diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Snapshots/Get.hs b/gen/Network/Google/Resource/Dataflow/Projects/Snapshots/Get.hs new file mode 100644 index 0000000..1ca3ead --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Snapshots/Get.hs @@ -0,0 +1,180 @@ +{-# 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.Dataflow.Projects.Snapshots.Get +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Gets information about a snapshot. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.snapshots.get@. +module Network.Google.Resource.Dataflow.Projects.Snapshots.Get + ( + -- * REST Resource + ProjectsSnapshotsGetResource + + -- * Creating a Request + , projectsSnapshotsGet + , ProjectsSnapshotsGet + + -- * Request Lenses + , psgXgafv + , psgUploadProtocol + , psgLocation + , psgAccessToken + , psgUploadType + , psgProjectId + , psgCallback + , psgSnapshotId + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.snapshots.get@ method which the +-- 'ProjectsSnapshotsGet' request conforms to. +type ProjectsSnapshotsGetResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "snapshots" :> + Capture "snapshotId" Text :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "location" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> Get '[JSON] Snapshot + +-- | Gets information about a snapshot. +-- +-- /See:/ 'projectsSnapshotsGet' smart constructor. +data ProjectsSnapshotsGet = + ProjectsSnapshotsGet' + { _psgXgafv :: !(Maybe Xgafv) + , _psgUploadProtocol :: !(Maybe Text) + , _psgLocation :: !(Maybe Text) + , _psgAccessToken :: !(Maybe Text) + , _psgUploadType :: !(Maybe Text) + , _psgProjectId :: !Text + , _psgCallback :: !(Maybe Text) + , _psgSnapshotId :: !Text + } + deriving (Eq, Show, Data, Typeable, Generic) + + +-- | Creates a value of 'ProjectsSnapshotsGet' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'psgXgafv' +-- +-- * 'psgUploadProtocol' +-- +-- * 'psgLocation' +-- +-- * 'psgAccessToken' +-- +-- * 'psgUploadType' +-- +-- * 'psgProjectId' +-- +-- * 'psgCallback' +-- +-- * 'psgSnapshotId' +projectsSnapshotsGet + :: Text -- ^ 'psgProjectId' + -> Text -- ^ 'psgSnapshotId' + -> ProjectsSnapshotsGet +projectsSnapshotsGet pPsgProjectId_ pPsgSnapshotId_ = + ProjectsSnapshotsGet' + { _psgXgafv = Nothing + , _psgUploadProtocol = Nothing + , _psgLocation = Nothing + , _psgAccessToken = Nothing + , _psgUploadType = Nothing + , _psgProjectId = pPsgProjectId_ + , _psgCallback = Nothing + , _psgSnapshotId = pPsgSnapshotId_ + } + + +-- | V1 error format. +psgXgafv :: Lens' ProjectsSnapshotsGet (Maybe Xgafv) +psgXgafv = lens _psgXgafv (\ s a -> s{_psgXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +psgUploadProtocol :: Lens' ProjectsSnapshotsGet (Maybe Text) +psgUploadProtocol + = lens _psgUploadProtocol + (\ s a -> s{_psgUploadProtocol = a}) + +-- | The location that contains this snapshot. +psgLocation :: Lens' ProjectsSnapshotsGet (Maybe Text) +psgLocation + = lens _psgLocation (\ s a -> s{_psgLocation = a}) + +-- | OAuth access token. +psgAccessToken :: Lens' ProjectsSnapshotsGet (Maybe Text) +psgAccessToken + = lens _psgAccessToken + (\ s a -> s{_psgAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +psgUploadType :: Lens' ProjectsSnapshotsGet (Maybe Text) +psgUploadType + = lens _psgUploadType + (\ s a -> s{_psgUploadType = a}) + +-- | The ID of the Cloud Platform project that the snapshot belongs to. +psgProjectId :: Lens' ProjectsSnapshotsGet Text +psgProjectId + = lens _psgProjectId (\ s a -> s{_psgProjectId = a}) + +-- | JSONP +psgCallback :: Lens' ProjectsSnapshotsGet (Maybe Text) +psgCallback + = lens _psgCallback (\ s a -> s{_psgCallback = a}) + +-- | The ID of the snapshot. +psgSnapshotId :: Lens' ProjectsSnapshotsGet Text +psgSnapshotId + = lens _psgSnapshotId + (\ s a -> s{_psgSnapshotId = a}) + +instance GoogleRequest ProjectsSnapshotsGet where + type Rs ProjectsSnapshotsGet = Snapshot + type Scopes ProjectsSnapshotsGet = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsSnapshotsGet'{..} + = go _psgProjectId _psgSnapshotId _psgXgafv + _psgUploadProtocol + _psgLocation + _psgAccessToken + _psgUploadType + _psgCallback + (Just AltJSON) + dataflowService + where go + = buildClient + (Proxy :: Proxy ProjectsSnapshotsGetResource) + mempty diff --git a/gen/Network/Google/Resource/Dataflow/Projects/Snapshots/List.hs b/gen/Network/Google/Resource/Dataflow/Projects/Snapshots/List.hs new file mode 100644 index 0000000..3835929 --- /dev/null +++ b/gen/Network/Google/Resource/Dataflow/Projects/Snapshots/List.hs @@ -0,0 +1,167 @@ +{-# 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.Dataflow.Projects.Snapshots.List +-- Copyright : (c) 2015-2016 Brendan Hay +-- License : Mozilla Public License, v. 2.0. +-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> +-- Stability : auto-generated +-- Portability : non-portable (GHC extensions) +-- +-- Lists snapshots. +-- +-- /See:/ <https://cloud.google.com/dataflow Dataflow API Reference> for @dataflow.projects.snapshots.list@. +module Network.Google.Resource.Dataflow.Projects.Snapshots.List + ( + -- * REST Resource + ProjectsSnapshotsListResource + + -- * Creating a Request + , projectsSnapshotsList + , ProjectsSnapshotsList + + -- * Request Lenses + , pslXgafv + , pslUploadProtocol + , pslLocation + , pslAccessToken + , pslUploadType + , pslProjectId + , pslCallback + ) where + +import Network.Google.Dataflow.Types +import Network.Google.Prelude + +-- | A resource alias for @dataflow.projects.snapshots.list@ method which the +-- 'ProjectsSnapshotsList' request conforms to. +type ProjectsSnapshotsListResource = + "v1b3" :> + "projects" :> + Capture "projectId" Text :> + "snapshots" :> + QueryParam "$.xgafv" Xgafv :> + QueryParam "upload_protocol" Text :> + QueryParam "location" Text :> + QueryParam "access_token" Text :> + QueryParam "uploadType" Text :> + QueryParam "callback" Text :> + QueryParam "alt" AltJSON :> + Get '[JSON] ListSnapshotsResponse + +-- | Lists snapshots. +-- +-- /See:/ 'projectsSnapshotsList' smart constructor. +data ProjectsSnapshotsList = + ProjectsSnapshotsList' + { _pslXgafv :: !(Maybe Xgafv) + , _pslUploadProtocol :: !(Maybe Text) + , _pslLocation :: !(Maybe Text) + , _pslAccessToken :: !(Maybe Text) + , _pslUploadType :: !(Maybe Text) + , _pslProjectId :: !Text + , _pslCallback :: !(Maybe Text) + } + deriving (Eq, Show, Data, Typeable, Generic) + + +-- | Creates a value of 'ProjectsSnapshotsList' with the minimum fields required to make a request. +-- +-- Use one of the following lenses to modify other fields as desired: +-- +-- * 'pslXgafv' +-- +-- * 'pslUploadProtocol' +-- +-- * 'pslLocation' +-- +-- * 'pslAccessToken' +-- +-- * 'pslUploadType' +-- +-- * 'pslProjectId' +-- +-- * 'pslCallback' +projectsSnapshotsList + :: Text -- ^ 'pslProjectId' + -> ProjectsSnapshotsList +projectsSnapshotsList pPslProjectId_ = + ProjectsSnapshotsList' + { _pslXgafv = Nothing + , _pslUploadProtocol = Nothing + , _pslLocation = Nothing + , _pslAccessToken = Nothing + , _pslUploadType = Nothing + , _pslProjectId = pPslProjectId_ + , _pslCallback = Nothing + } + + +-- | V1 error format. +pslXgafv :: Lens' ProjectsSnapshotsList (Maybe Xgafv) +pslXgafv = lens _pslXgafv (\ s a -> s{_pslXgafv = a}) + +-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). +pslUploadProtocol :: Lens' ProjectsSnapshotsList (Maybe Text) +pslUploadProtocol + = lens _pslUploadProtocol + (\ s a -> s{_pslUploadProtocol = a}) + +-- | The location to list snapshots in. +pslLocation :: Lens' ProjectsSnapshotsList (Maybe Text) +pslLocation + = lens _pslLocation (\ s a -> s{_pslLocation = a}) + +-- | OAuth access token. +pslAccessToken :: Lens' ProjectsSnapshotsList (Maybe Text) +pslAccessToken + = lens _pslAccessToken + (\ s a -> s{_pslAccessToken = a}) + +-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). +pslUploadType :: Lens' ProjectsSnapshotsList (Maybe Text) +pslUploadType + = lens _pslUploadType + (\ s a -> s{_pslUploadType = a}) + +-- | The project ID to list snapshots for. +pslProjectId :: Lens' ProjectsSnapshotsList Text +pslProjectId + = lens _pslProjectId (\ s a -> s{_pslProjectId = a}) + +-- | JSONP +pslCallback :: Lens' ProjectsSnapshotsList (Maybe Text) +pslCallback + = lens _pslCallback (\ s a -> s{_pslCallback = a}) + +instance GoogleRequest ProjectsSnapshotsList where + type Rs ProjectsSnapshotsList = ListSnapshotsResponse + type Scopes ProjectsSnapshotsList = + '["https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email"] + requestClient ProjectsSnapshotsList'{..} + = go _pslProjectId _pslXgafv _pslUploadProtocol + _pslLocation + _pslAccessToken + _pslUploadType + _pslCallback + (Just AltJSON) + dataflowService + where go + = buildClient + (Proxy :: Proxy ProjectsSnapshotsListResource) + mempty |