1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE FlexibleInstances #-}
5{-# LANGUAGE NoImplicitPrelude #-}
6{-# LANGUAGE OverloadedStrings #-}
7{-# LANGUAGE RecordWildCards #-}
8{-# LANGUAGE TypeFamilies #-}
9{-# LANGUAGE TypeOperators #-}
11{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13{-# OPTIONS_GHC -fno-warn-unused-imports #-}
16-- Module : Network.Google.Resource.ContainerAnalysis.Projects.Notes.Create
17-- Copyright : (c) 2015-2016 Brendan Hay
18-- License : Mozilla Public License, v. 2.0.
19-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20-- Stability : auto-generated
21-- Portability : non-portable (GHC extensions)
25-- /See:/ <https://cloud.google.com/container-analysis/api/reference/rest/ Container Analysis API Reference> for @containeranalysis.projects.notes.create@.
26module Network.Google.Resource.ContainerAnalysis.Projects.Notes.Create
29 ProjectsNotesCreateResource
31 -- * Creating a Request
46import Network.Google.ContainerAnalysis.Types
47import Network.Google.Prelude
49-- | A resource alias for @containeranalysis.projects.notes.create@ method which the
50-- 'ProjectsNotesCreate' request conforms to.
51type ProjectsNotesCreateResource =
53 Capture "parent" Text :>
55 QueryParam "$.xgafv" Xgafv :>
56 QueryParam "upload_protocol" Text :>
57 QueryParam "access_token" Text :>
58 QueryParam "uploadType" Text :>
59 QueryParam "noteId" Text :>
60 QueryParam "callback" Text :>
61 QueryParam "alt" AltJSON :>
62 ReqBody '[JSON] Note :> Post '[JSON] Note
64-- | Creates a new note.
66-- /See:/ 'projectsNotesCreate' smart constructor.
67data ProjectsNotesCreate =
70 , _pncXgafv :: !(Maybe Xgafv)
71 , _pncUploadProtocol :: !(Maybe Text)
72 , _pncAccessToken :: !(Maybe Text)
73 , _pncUploadType :: !(Maybe Text)
74 , _pncPayload :: !Note
75 , _pncNoteId :: !(Maybe Text)
76 , _pncCallback :: !(Maybe Text)
78 deriving (Eq, Show, Data, Typeable, Generic)
81-- | Creates a value of 'ProjectsNotesCreate' with the minimum fields required to make a request.
83-- Use one of the following lenses to modify other fields as desired:
89-- * 'pncUploadProtocol'
101 :: Text -- ^ 'pncParent'
102 -> Note -- ^ 'pncPayload'
103 -> ProjectsNotesCreate
104projectsNotesCreate pPncParent_ pPncPayload_ =
106 { _pncParent = pPncParent_
107 , _pncXgafv = Nothing
108 , _pncUploadProtocol = Nothing
109 , _pncAccessToken = Nothing
110 , _pncUploadType = Nothing
111 , _pncPayload = pPncPayload_
112 , _pncNoteId = Nothing
113 , _pncCallback = Nothing
117-- | The name of the project in the form of \`projects\/[PROJECT_ID]\`, under
118-- which the note is to be created.
119pncParent :: Lens' ProjectsNotesCreate Text
121 = lens _pncParent (\ s a -> s{_pncParent = a})
124pncXgafv :: Lens' ProjectsNotesCreate (Maybe Xgafv)
125pncXgafv = lens _pncXgafv (\ s a -> s{_pncXgafv = a})
127-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
128pncUploadProtocol :: Lens' ProjectsNotesCreate (Maybe Text)
130 = lens _pncUploadProtocol
131 (\ s a -> s{_pncUploadProtocol = a})
133-- | OAuth access token.
134pncAccessToken :: Lens' ProjectsNotesCreate (Maybe Text)
136 = lens _pncAccessToken
137 (\ s a -> s{_pncAccessToken = a})
139-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
140pncUploadType :: Lens' ProjectsNotesCreate (Maybe Text)
142 = lens _pncUploadType
143 (\ s a -> s{_pncUploadType = a})
145-- | Multipart request metadata.
146pncPayload :: Lens' ProjectsNotesCreate Note
148 = lens _pncPayload (\ s a -> s{_pncPayload = a})
150-- | The ID to use for this note.
151pncNoteId :: Lens' ProjectsNotesCreate (Maybe Text)
153 = lens _pncNoteId (\ s a -> s{_pncNoteId = a})
156pncCallback :: Lens' ProjectsNotesCreate (Maybe Text)
158 = lens _pncCallback (\ s a -> s{_pncCallback = a})
160instance GoogleRequest ProjectsNotesCreate where
161 type Rs ProjectsNotesCreate = Note
162 type Scopes ProjectsNotesCreate =
163 '["https://www.googleapis.com/auth/cloud-platform"]
164 requestClient ProjectsNotesCreate'{..}
165 = go _pncParent _pncXgafv _pncUploadProtocol
172 containerAnalysisService
175 (Proxy :: Proxy ProjectsNotesCreateResource)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list