on develop help sign in
Regenerating gogol-logging from updated service defintions
commita96c9672b32a9eb6a15665a40dbf27366927e676 authorBrendan Hay <brendan.g.hay@gmail.com> dateSat 11 Feb 2017, 11:36 (10 years ago) parent0f1a943
40 files changed+3795−360
gogol-logging/gen/Network/Google/Logging.hs+91−1 gogol-logging/gen/Network/Google/Logging/Types.hs+15 gogol-logging/gen/Network/Google/Logging/Types/Product.hs+342−178 gogol-logging/gen/Network/Google/Logging/Types/Sum.hs+8−8 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Logs/Delete.hs+10−6 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Logs/List.hs+209 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Create.hs+219 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Delete.hs+180 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Get.hs+176 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/List.hs+207 gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Update.hs+220 gogol-logging/gen/Network/Google/Resource/Logging/Entries/List.hs+4−6 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/Delete.hs+177 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/List.hs+207 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Create.hs+217 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Delete.hs+178 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Get.hs+175 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/List.hs+205 gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Update.hs+217 gogol-logging/gen/Network/Google/Resource/Logging/MonitoredResourceDescriptors/List.hs+8−6 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Logs/Delete.hs+10−6 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Logs/List.hs+207 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Create.hs+55−24 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Delete.hs+11−6 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Get.hs+4−2 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/List.hs+6−6 gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Update.hs+56−25 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs+10−6 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hs+207 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Create.hs+2−2 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Delete.hs+2−2 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Get.hs+2−2 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/List.hs+6−6 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Update.hs+5−5 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs+55−24 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Delete.hs+11−6 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs+4−2 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/List.hs+6−6 gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Update.hs+56−25 gogol-logging/gogol-logging.cabal+15
gogol-logging/gen/Network/Google/Logging.hs+91−1
@@ -36,18 +36,60 @@ module Network.Google.Logging
3636 -- ** logging.billingAccounts.logs.delete
3737 , module Network.Google.Resource.Logging.BillingAccounts.Logs.Delete
3838
39+ -- ** logging.billingAccounts.logs.list
40+ , module Network.Google.Resource.Logging.BillingAccounts.Logs.List
41+
42+ -- ** logging.billingAccounts.sinks.create
43+ , module Network.Google.Resource.Logging.BillingAccounts.Sinks.Create
44+
45+ -- ** logging.billingAccounts.sinks.delete
46+ , module Network.Google.Resource.Logging.BillingAccounts.Sinks.Delete
47+
48+ -- ** logging.billingAccounts.sinks.get
49+ , module Network.Google.Resource.Logging.BillingAccounts.Sinks.Get
50+
51+ -- ** logging.billingAccounts.sinks.list
52+ , module Network.Google.Resource.Logging.BillingAccounts.Sinks.List
53+
54+ -- ** logging.billingAccounts.sinks.update
55+ , module Network.Google.Resource.Logging.BillingAccounts.Sinks.Update
56+
3957 -- ** logging.entries.list
4058 , module Network.Google.Resource.Logging.Entries.List
4159
4260 -- ** logging.entries.write
4361 , module Network.Google.Resource.Logging.Entries.Write
4462
63+ -- ** logging.folders.logs.delete
64+ , module Network.Google.Resource.Logging.Folders.Logs.Delete
65+
66+ -- ** logging.folders.logs.list
67+ , module Network.Google.Resource.Logging.Folders.Logs.List
68+
69+ -- ** logging.folders.sinks.create
70+ , module Network.Google.Resource.Logging.Folders.Sinks.Create
71+
72+ -- ** logging.folders.sinks.delete
73+ , module Network.Google.Resource.Logging.Folders.Sinks.Delete
74+
75+ -- ** logging.folders.sinks.get
76+ , module Network.Google.Resource.Logging.Folders.Sinks.Get
77+
78+ -- ** logging.folders.sinks.list
79+ , module Network.Google.Resource.Logging.Folders.Sinks.List
80+
81+ -- ** logging.folders.sinks.update
82+ , module Network.Google.Resource.Logging.Folders.Sinks.Update
83+
4584 -- ** logging.monitoredResourceDescriptors.list
4685 , module Network.Google.Resource.Logging.MonitoredResourceDescriptors.List
4786
4887 -- ** logging.organizations.logs.delete
4988 , module Network.Google.Resource.Logging.Organizations.Logs.Delete
5089
90+ -- ** logging.organizations.logs.list
91+ , module Network.Google.Resource.Logging.Organizations.Logs.List
92+
5193 -- ** logging.organizations.sinks.create
5294 , module Network.Google.Resource.Logging.Organizations.Sinks.Create
5395
@@ -66,6 +108,9 @@ module Network.Google.Logging
66108 -- ** logging.projects.logs.delete
67109 , module Network.Google.Resource.Logging.Projects.Logs.Delete
68110
111+ -- ** logging.projects.logs.list
112+ , module Network.Google.Resource.Logging.Projects.Logs.List
113+
69114 -- ** logging.projects.metrics.create
70115 , module Network.Google.Resource.Logging.Projects.Metrics.Create
71116
@@ -195,6 +240,13 @@ module Network.Google.Logging
195240 , logEntryProtoPayload
196241 , leppAddtional
197242
243+ -- ** LogEntrySourceLocation
244+ , LogEntrySourceLocation
245+ , logEntrySourceLocation
246+ , leslFunction
247+ , leslLine
248+ , leslFile
249+
198250 -- ** WriteLogEntriesResponse
199251 , WriteLogEntriesResponse
200252 , writeLogEntriesResponse
@@ -210,6 +262,12 @@ module Network.Google.Logging
210262 , lsEndTime
211263 , lsFilter
212264
265+ -- ** ListLogsResponse
266+ , ListLogsResponse
267+ , listLogsResponse
268+ , llrNextPageToken
269+ , llrLogNames
270+
213271 -- ** ListMonitoredResourceDescriptorsResponse
214272 , ListMonitoredResourceDescriptorsResponse
215273 , listMonitoredResourceDescriptorsResponse
@@ -304,8 +362,10 @@ module Network.Google.Logging
304362 , leInsertId
305363 , leLabels
306364 , leProtoPayload
365+ , leSourceLocation
307366 , leLogName
308367 , leTimestamp
368+ , leTrace
309369
310370 -- ** SourceLocation
311371 , SourceLocation
@@ -335,16 +395,31 @@ module Network.Google.Logging
335395import Network.Google.Logging.Types
336396import Network.Google.Prelude
337397import Network.Google.Resource.Logging.BillingAccounts.Logs.Delete
398+import Network.Google.Resource.Logging.BillingAccounts.Logs.List
399+import Network.Google.Resource.Logging.BillingAccounts.Sinks.Create
400+import Network.Google.Resource.Logging.BillingAccounts.Sinks.Delete
401+import Network.Google.Resource.Logging.BillingAccounts.Sinks.Get
402+import Network.Google.Resource.Logging.BillingAccounts.Sinks.List
403+import Network.Google.Resource.Logging.BillingAccounts.Sinks.Update
338404import Network.Google.Resource.Logging.Entries.List
339405import Network.Google.Resource.Logging.Entries.Write
406+import Network.Google.Resource.Logging.Folders.Logs.Delete
407+import Network.Google.Resource.Logging.Folders.Logs.List
408+import Network.Google.Resource.Logging.Folders.Sinks.Create
409+import Network.Google.Resource.Logging.Folders.Sinks.Delete
410+import Network.Google.Resource.Logging.Folders.Sinks.Get
411+import Network.Google.Resource.Logging.Folders.Sinks.List
412+import Network.Google.Resource.Logging.Folders.Sinks.Update
340413import Network.Google.Resource.Logging.MonitoredResourceDescriptors.List
341414import Network.Google.Resource.Logging.Organizations.Logs.Delete
415+import Network.Google.Resource.Logging.Organizations.Logs.List
342416import Network.Google.Resource.Logging.Organizations.Sinks.Create
343417import Network.Google.Resource.Logging.Organizations.Sinks.Delete
344418import Network.Google.Resource.Logging.Organizations.Sinks.Get
345419import Network.Google.Resource.Logging.Organizations.Sinks.List
346420import Network.Google.Resource.Logging.Organizations.Sinks.Update
347421import Network.Google.Resource.Logging.Projects.Logs.Delete
422+import Network.Google.Resource.Logging.Projects.Logs.List
348423import Network.Google.Resource.Logging.Projects.Metrics.Create
349424import Network.Google.Resource.Logging.Projects.Metrics.Delete
350425import Network.Google.Resource.Logging.Projects.Metrics.Get
@@ -363,12 +438,20 @@ TODO
363438-- | Represents the entirety of the methods and resources available for the Stackdriver Logging API service.
364439type LoggingAPI =
365440 EntriesListResource :<|> EntriesWriteResource :<|>
366− MonitoredResourceDescriptorsListResource
441+ FoldersSinksListResource
442+ :<|> FoldersSinksGetResource
443+ :<|> FoldersSinksCreateResource
444+ :<|> FoldersSinksDeleteResource
445+ :<|> FoldersSinksUpdateResource
446+ :<|> FoldersLogsListResource
447+ :<|> FoldersLogsDeleteResource
448+ :<|> MonitoredResourceDescriptorsListResource
367449 :<|> OrganizationsSinksListResource
368450 :<|> OrganizationsSinksGetResource
369451 :<|> OrganizationsSinksCreateResource
370452 :<|> OrganizationsSinksDeleteResource
371453 :<|> OrganizationsSinksUpdateResource
454+ :<|> OrganizationsLogsListResource
372455 :<|> OrganizationsLogsDeleteResource
373456 :<|> ProjectsSinksListResource
374457 :<|> ProjectsSinksGetResource
@@ -380,5 +463,12 @@ type LoggingAPI =
380463 :<|> ProjectsMetricsCreateResource
381464 :<|> ProjectsMetricsDeleteResource
382465 :<|> ProjectsMetricsUpdateResource
466+ :<|> ProjectsLogsListResource
383467 :<|> ProjectsLogsDeleteResource
468+ :<|> BillingAccountsSinksListResource
469+ :<|> BillingAccountsSinksGetResource
470+ :<|> BillingAccountsSinksCreateResource
471+ :<|> BillingAccountsSinksDeleteResource
472+ :<|> BillingAccountsSinksUpdateResource
473+ :<|> BillingAccountsLogsListResource
384474 :<|> BillingAccountsLogsDeleteResource
gogol-logging/gen/Network/Google/Logging/Types.hs+15
@@ -123,6 +123,13 @@ module Network.Google.Logging.Types
123123 , logEntryProtoPayload
124124 , leppAddtional
125125
126+ -- * LogEntrySourceLocation
127+ , LogEntrySourceLocation
128+ , logEntrySourceLocation
129+ , leslFunction
130+ , leslLine
131+ , leslFile
132+
126133 -- * WriteLogEntriesResponse
127134 , WriteLogEntriesResponse
128135 , writeLogEntriesResponse
@@ -138,6 +145,12 @@ module Network.Google.Logging.Types
138145 , lsEndTime
139146 , lsFilter
140147
148+ -- * ListLogsResponse
149+ , ListLogsResponse
150+ , listLogsResponse
151+ , llrNextPageToken
152+ , llrLogNames
153+
141154 -- * ListMonitoredResourceDescriptorsResponse
142155 , ListMonitoredResourceDescriptorsResponse
143156 , listMonitoredResourceDescriptorsResponse
@@ -232,8 +245,10 @@ module Network.Google.Logging.Types
232245 , leInsertId
233246 , leLabels
234247 , leProtoPayload
248+ , leSourceLocation
235249 , leLogName
236250 , leTimestamp
251+ , leTrace
237252
238253 -- * SourceLocation
239254 , SourceLocation
gogol-logging/gen/Network/Google/Logging/Types/Product.hs+342−178
@@ -23,11 +23,10 @@ import Network.Google.Prelude
2323-- | An object that describes the schema of a MonitoredResource object using
2424-- a type name and a set of labels. For example, the monitored resource
2525-- descriptor for Google Compute Engine VM instances has a type of
26−-- \`\"gce_instance\"\` and specifies the use of the labels
27−-- \`\"instance_id\"\` and \`\"zone\"\` to identify particular VM
28−-- instances. Different APIs can support different monitored resource
29−-- types. APIs generally provide a \`list\` method that returns the
30−-- monitored resource descriptors used by the API.
26+-- \"gce_instance\" and specifies the use of the labels \"instance_id\" and
27+-- \"zone\" to identify particular VM instances.Different APIs can support
28+-- different monitored resource types. APIs generally provide a list method
29+-- that returns the monitored resource descriptors used by the API.
3130--
3231-- /See:/ 'monitoredResourceDescriptor' smart constructor.
3332data MonitoredResourceDescriptor = MonitoredResourceDescriptor'
@@ -63,18 +62,18 @@ monitoredResourceDescriptor =
6362 }
6463
6564-- | Optional. The resource name of the monitored resource descriptor:
66−-- \`\"projects\/{project_id}\/monitoredResourceDescriptors\/{type}\"\`
67−-- where {type} is the value of the \`type\` field in this object and
68−-- {project_id} is a project ID that provides API-specific context for
69−-- accessing the type. APIs that do not use project information can use the
70−-- resource name format \`\"monitoredResourceDescriptors\/{type}\"\`.
65+-- \"projects\/{project_id}\/monitoredResourceDescriptors\/{type}\" where
66+-- {type} is the value of the type field in this object and {project_id} is
67+-- a project ID that provides API-specific context for accessing the type.
68+-- APIs that do not use project information can use the resource name
69+-- format \"monitoredResourceDescriptors\/{type}\".
7170mrdName :: Lens' MonitoredResourceDescriptor (Maybe Text)
7271mrdName = lens _mrdName (\ s a -> s{_mrdName = a})
7372
7473-- | Optional. A concise name for the monitored resource type that might be
7574-- displayed in user interfaces. It should be a Title Cased Noun Phrase,
76−-- without any article or other determiners. For example, \`\"Google Cloud
77−-- SQL Database\"\`.
75+-- without any article or other determiners. For example, \"Google Cloud
76+-- SQL Database\".
7877mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
7978mrdDisplayName
8079 = lens _mrdDisplayName
@@ -82,8 +81,7 @@ mrdDisplayName
8281
8382-- | Required. A set of labels used to describe instances of this monitored
8483-- resource type. For example, an individual Google Cloud SQL database is
85−-- identified by values for the labels \`\"database_id\"\` and
86−-- \`\"zone\"\`.
84+-- identified by values for the labels \"database_id\" and \"zone\".
8785mrdLabels :: Lens' MonitoredResourceDescriptor [LabelDescriptor]
8886mrdLabels
8987 = lens _mrdLabels (\ s a -> s{_mrdLabels = a}) .
@@ -91,7 +89,7 @@ mrdLabels
9189 . _Coerce
9290
9391-- | Required. The monitored resource type. For example, the type
94−-- \`\"cloudsql_database\"\` represents databases in Google Cloud SQL. The
92+-- \"cloudsql_database\" represents databases in Google Cloud SQL. The
9593-- maximum length of this value is 256 characters.
9694mrdType :: Lens' MonitoredResourceDescriptor (Maybe Text)
9795mrdType = lens _mrdType (\ s a -> s{_mrdType = a})
@@ -123,7 +121,7 @@ instance ToJSON MonitoredResourceDescriptor where
123121 ("type" .=) <$> _mrdType,
124122 ("description" .=) <$> _mrdDescription])
125123
126−-- | Result returned from \`ListLogEntries\`.
124+-- | Result returned from ListLogEntries.
127125--
128126-- /See:/ 'listLogEntriesResponse' smart constructor.
129127data ListLogEntriesResponse = ListLogEntriesResponse'
@@ -146,9 +144,15 @@ listLogEntriesResponse =
146144 , _llerEntries = Nothing
147145 }
148146
149−-- | If there might be more results than appear in this response, then
150−-- \`nextPageToken\` is included. To get the next set of results, call this
151−-- method again using the value of \`nextPageToken\` as \`pageToken\`.
147+-- | If there might be more results than those appearing in this response,
148+-- then nextPageToken is included. To get the next set of results, call
149+-- this method again using the value of nextPageToken as pageToken.If a
150+-- value for next_page_token appears and the entries field is empty, it
151+-- means that the search found no log entries so far but it did not have
152+-- time to search all the possible log entries. Retry the method with this
153+-- value for page_token to continue the search. Alternatively, consider
154+-- speeding up the search by changing your filter to specify a single log
155+-- name or resource type, or to narrow the time range of the search.
152156llerNextPageToken :: Lens' ListLogEntriesResponse (Maybe Text)
153157llerNextPageToken
154158 = lens _llerNextPageToken
@@ -178,7 +182,7 @@ instance ToJSON ListLogEntriesResponse where
178182
179183-- | Required. Values for all of the labels listed in the associated
180184-- monitored resource descriptor. For example, Cloud SQL databases use the
181−-- labels \`\"database_id\"\` and \`\"zone\"\`.
185+-- labels \"database_id\" and \"zone\".
182186--
183187-- /See:/ 'monitoredResourceLabels' smart constructor.
184188newtype MonitoredResourceLabels = MonitoredResourceLabels'
@@ -243,8 +247,8 @@ llmrMetrics
243247 . _Coerce
244248
245249-- | If there might be more results than appear in this response, then
246−-- \`nextPageToken\` is included. To get the next set of results, call this
247−-- method again using the value of \`nextPageToken\` as \`pageToken\`.
250+-- nextPageToken is included. To get the next set of results, call this
251+-- method again using the value of nextPageToken as pageToken.
248252llmrNextPageToken :: Lens' ListLogMetricsResponse (Maybe Text)
249253llmrNextPageToken
250254 = lens _llmrNextPageToken
@@ -301,12 +305,11 @@ writeLogEntriesRequest =
301305 }
302306
303307-- | Required. The log entries to write. Values supplied for the fields
304−-- \`log_name\`, \`resource\`, and \`labels\` in this \`entries.write\`
305−-- request are added to those log entries that do not provide their own
306−-- values for the fields. To improve throughput and to avoid exceeding the
307−-- [quota limit](\/logging\/quota-policy) for calls to \`entries.write\`,
308−-- you should write multiple log entries at once rather than calling this
309−-- method for each individual log entry.
308+-- log_name, resource, and labels in this entries.write request are added
309+-- to those log entries that do not provide their own values for the
310+-- fields.To improve throughput and to avoid exceeding the quota limit for
311+-- calls to entries.write, you should write multiple log entries at once
312+-- rather than calling this method for each individual log entry.
310313wlerEntries :: Lens' WriteLogEntriesRequest [LogEntry]
311314wlerEntries
312315 = lens _wlerEntries (\ s a -> s{_wlerEntries = a}) .
@@ -324,7 +327,7 @@ wlerPartialSuccess
324327 (\ s a -> s{_wlerPartialSuccess = a})
325328
326329-- | Optional. A default monitored resource object that is assigned to all
327−-- log entries in \`entries\` that do not specify a value for \`resource\`.
330+-- log entries in entries that do not specify a value for resource.
328331-- Example: { \"type\": \"gce_instance\", \"labels\": { \"zone\":
329332-- \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }} See
330333-- LogEntry.
@@ -332,17 +335,21 @@ wlerResource :: Lens' WriteLogEntriesRequest (Maybe MonitoredResource)
332335wlerResource
333336 = lens _wlerResource (\ s a -> s{_wlerResource = a})
334337
335−-- | Optional. Default labels that are added to the \`labels\` field of all
336−-- log entries in \`entries\`. If a log entry already has a label with the
337−-- same key as a label in this parameter, then the log entry\'s label is
338−-- not changed. See LogEntry.
338+-- | Optional. Default labels that are added to the labels field of all log
339+-- entries in entries. If a log entry already has a label with the same key
340+-- as a label in this parameter, then the log entry\'s label is not
341+-- changed. See LogEntry.
339342wlerLabels :: Lens' WriteLogEntriesRequest (Maybe WriteLogEntriesRequestLabels)
340343wlerLabels
341344 = lens _wlerLabels (\ s a -> s{_wlerLabels = a})
342345
343346-- | Optional. A default log resource name that is assigned to all log
344−-- entries in \`entries\` that do not specify a value for \`log_name\`.
345−-- Example: \`\"projects\/my-project\/logs\/syslog\"\`. See LogEntry.
347+-- entries in entries that do not specify a value for log_name:
348+-- \"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\"
349+-- \"organizations\/[ORGANIZATION_ID]\/logs\/[LOG_ID]\" [LOG_ID] must be
350+-- URL-encoded. For example, \"projects\/my-project-id\/logs\/syslog\" or
351+-- \"organizations\/1234567890\/logs\/cloudresourcemanager.googleapis.com%2Factivity\".
352+-- For more information about log names, see LogEntry.
346353wlerLogName :: Lens' WriteLogEntriesRequest (Maybe Text)
347354wlerLogName
348355 = lens _wlerLogName (\ s a -> s{_wlerLogName = a})
@@ -372,7 +379,7 @@ instance ToJSON WriteLogEntriesRequest where
372379-- empty messages in your APIs. A typical example is to use it as the
373380-- request or the response type of an API method. For instance: service Foo
374381-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
375−-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
382+-- JSON representation for Empty is empty JSON object {}.
376383--
377384-- /See:/ 'empty' smart constructor.
378385data Empty =
@@ -425,7 +432,7 @@ instance FromJSON LogEntryLabels where
425432instance ToJSON LogEntryLabels where
426433 toJSON = toJSON . _lelAddtional
427434
428−-- | Result returned from \`ListSinks\`.
435+-- | Result returned from ListSinks.
429436--
430437-- /See:/ 'listSinksResponse' smart constructor.
431438data ListSinksResponse = ListSinksResponse'
@@ -456,8 +463,8 @@ lsrSinks
456463 . _Coerce
457464
458465-- | If there might be more results than appear in this response, then
459−-- \`nextPageToken\` is included. To get the next set of results, call the
460−-- same method again using the value of \`nextPageToken\` as \`pageToken\`.
466+-- nextPageToken is included. To get the next set of results, call the same
467+-- method again using the value of nextPageToken as pageToken.
461468lsrNextPageToken :: Lens' ListSinksResponse (Maybe Text)
462469lsrNextPageToken
463470 = lens _lsrNextPageToken
@@ -622,7 +629,7 @@ requestLog =
622629 , _rlAppEngineRelease = Nothing
623630 }
624631
625−-- | Cloud Trace identifier for this request.
632+-- | Stackdriver Trace identifier for this request.
626633rlTraceId :: Lens' RequestLog (Maybe Text)
627634rlTraceId
628635 = lens _rlTraceId (\ s a -> s{_rlTraceId = a})
@@ -664,7 +671,7 @@ rlVersionId :: Lens' RequestLog (Maybe Text)
664671rlVersionId
665672 = lens _rlVersionId (\ s a -> s{_rlVersionId = a})
666673
667−-- | HTTP version of request. Example: \`\"HTTP\/1.1\"\`.
674+-- | HTTP version of request. Example: \"HTTP\/1.1\".
668675rlHTTPVersion :: Lens' RequestLog (Maybe Text)
669676rlHTTPVersion
670677 = lens _rlHTTPVersion
@@ -689,8 +696,8 @@ rlWasLoadingRequest
689696 (\ s a -> s{_rlWasLoadingRequest = a})
690697
691698-- | Whether this is the first RequestLog entry for this request. If an
692−-- active request has several RequestLog entries written to Cloud Logging,
693−-- this field will be set for one of them.
699+-- active request has several RequestLog entries written to Stackdriver
700+-- Logging, then this field will be set for one of them.
694701rlFirst :: Lens' RequestLog (Maybe Bool)
695702rlFirst = lens _rlFirst (\ s a -> s{_rlFirst = a})
696703
@@ -738,15 +745,15 @@ rlIP = lens _rlIP (\ s a -> s{_rlIP = a})
738745rlAppId :: Lens' RequestLog (Maybe Text)
739746rlAppId = lens _rlAppId (\ s a -> s{_rlAppId = a})
740747
741−-- | Request method. Example: \`\"GET\"\`, \`\"HEAD\"\`, \`\"PUT\"\`,
742−-- \`\"POST\"\`, \`\"DELETE\"\`.
748+-- | Request method. Example: \"GET\", \"HEAD\", \"PUT\", \"POST\",
749+-- \"DELETE\".
743750rlMethod :: Lens' RequestLog (Maybe Text)
744751rlMethod = lens _rlMethod (\ s a -> s{_rlMethod = a})
745752
746753-- | Contains the path and query portion of the URL that was requested. For
747754-- example, if the URL was \"http:\/\/example.com\/app?name=val\", the
748755-- resource would be \"\/app?name=val\". The fragment identifier, which is
749−-- identified by the \`#\` character, is not included.
756+-- identified by the # character, is not included.
750757rlResource :: Lens' RequestLog (Maybe Text)
751758rlResource
752759 = lens _rlResource (\ s a -> s{_rlResource = a})
@@ -773,11 +780,11 @@ rlUserAgent :: Lens' RequestLog (Maybe Text)
773780rlUserAgent
774781 = lens _rlUserAgent (\ s a -> s{_rlUserAgent = a})
775782
776−-- | The logged-in user who made the request. Most likely, this is the part
777−-- of the user\'s email before the \`\'\` sign. The field value is the same
778−-- for different requests from the same user, but different users can have
783+-- | The logged-in user who made the request.Most likely, this is the part of
784+-- the user\'s email before the \' sign. The field value is the same for
785+-- different requests from the same user, but different users can have
779786-- similar names. This information is also available to the application via
780−-- the App Engine Users API. This field will be populated starting with App
787+-- the App Engine Users API.This field will be populated starting with App
781788-- Engine 1.9.21.
782789rlNickname :: Lens' RequestLog (Maybe Text)
783790rlNickname
@@ -926,6 +933,72 @@ instance FromJSON LogEntryProtoPayload where
926933instance ToJSON LogEntryProtoPayload where
927934 toJSON = toJSON . _leppAddtional
928935
936+-- | Additional information about the source code location that produced the
937+-- log entry.
938+--
939+-- /See:/ 'logEntrySourceLocation' smart constructor.
940+data LogEntrySourceLocation = LogEntrySourceLocation'
941+ { _leslFunction :: !(Maybe Text)
942+ , _leslLine :: !(Maybe (Textual Int64))
943+ , _leslFile :: !(Maybe Text)
944+ } deriving (Eq,Show,Data,Typeable,Generic)
945+
946+-- | Creates a value of 'LogEntrySourceLocation' with the minimum fields required to make a request.
947+--
948+-- Use one of the following lenses to modify other fields as desired:
949+--
950+-- * 'leslFunction'
951+--
952+-- * 'leslLine'
953+--
954+-- * 'leslFile'
955+logEntrySourceLocation
956+ :: LogEntrySourceLocation
957+logEntrySourceLocation =
958+ LogEntrySourceLocation'
959+ { _leslFunction = Nothing
960+ , _leslLine = Nothing
961+ , _leslFile = Nothing
962+ }
963+
964+-- | Optional. Human-readable name of the function or method being invoked,
965+-- with optional context such as the class or package name. This
966+-- information may be used in contexts such as the logs viewer, where a
967+-- file and line number are less meaningful. The format can vary by
968+-- language. For example: qual.if.ied.Class.method (Java),
969+-- dir\/package.func (Go), function (Python).
970+leslFunction :: Lens' LogEntrySourceLocation (Maybe Text)
971+leslFunction
972+ = lens _leslFunction (\ s a -> s{_leslFunction = a})
973+
974+-- | Optional. Line within the source file. 1-based; 0 indicates no line
975+-- number available.
976+leslLine :: Lens' LogEntrySourceLocation (Maybe Int64)
977+leslLine
978+ = lens _leslLine (\ s a -> s{_leslLine = a}) .
979+ mapping _Coerce
980+
981+-- | Optional. Source file name. Depending on the runtime environment, this
982+-- might be a simple name or a fully-qualified name.
983+leslFile :: Lens' LogEntrySourceLocation (Maybe Text)
984+leslFile = lens _leslFile (\ s a -> s{_leslFile = a})
985+
986+instance FromJSON LogEntrySourceLocation where
987+ parseJSON
988+ = withObject "LogEntrySourceLocation"
989+ (\ o ->
990+ LogEntrySourceLocation' <$>
991+ (o .:? "function") <*> (o .:? "line") <*>
992+ (o .:? "file"))
993+
994+instance ToJSON LogEntrySourceLocation where
995+ toJSON LogEntrySourceLocation'{..}
996+ = object
997+ (catMaybes
998+ [("function" .=) <$> _leslFunction,
999+ ("line" .=) <$> _leslLine,
1000+ ("file" .=) <$> _leslFile])
1001+
9291002-- | Result returned from WriteLogEntries. empty
9301003--
9311004-- /See:/ 'writeLogEntriesResponse' smart constructor.
@@ -947,8 +1020,10 @@ instance FromJSON WriteLogEntriesResponse where
9471020instance ToJSON WriteLogEntriesResponse where
9481021 toJSON = const emptyObject
9491022
950−-- | Describes a sink used to export log entries outside of Stackdriver
951−-- Logging.
1023+-- | Describes a sink used to export log entries to one of the following
1024+-- destinations in any project: a Cloud Storage bucket, a BigQuery dataset,
1025+-- or a Cloud Pub\/Sub topic. A logs filter controls which log entries are
1026+-- exported. The sink must be created within a project or organization.
9521027--
9531028-- /See:/ 'logSink' smart constructor.
9541029data LogSink = LogSink'
@@ -991,69 +1066,72 @@ logSink =
9911066 , _lsFilter = Nothing
9921067 }
9931068
994−-- | Required. The export destination. See [Exporting Logs With
995−-- Sinks](\/logging\/docs\/api\/tasks\/exporting-logs). Examples:
996−-- \"storage.googleapis.com\/my-gcs-bucket\"
997−-- \"bigquery.googleapis.com\/projects\/my-project-id\/datasets\/my-dataset\"
998−-- \"pubsub.googleapis.com\/projects\/my-project\/topics\/my-topic\"
1069+-- | Required. The export destination:
1070+-- \"storage.googleapis.com\/[GCS_BUCKET]\"
1071+-- \"bigquery.googleapis.com\/projects\/[PROJECT_ID]\/datasets\/[DATASET]\"
1072+-- \"pubsub.googleapis.com\/projects\/[PROJECT_ID]\/topics\/[TOPIC_ID]\"
1073+-- The sink\'s writer_identity, set when the sink is created, must have
1074+-- permission to write to the destination or else the log entries are not
1075+-- exported. For more information, see Exporting Logs With Sinks.
9991076lsDestination :: Lens' LogSink (Maybe Text)
10001077lsDestination
10011078 = lens _lsDestination
10021079 (\ s a -> s{_lsDestination = a})
10031080
1004−-- | Optional. Time range for which this sink is active. Logs are exported
1005−-- only if start_time \<= entry.timestamp \< end_time Both start_time and
1006−-- end_time may be omitted to specify (half) infinite ranges. The
1007−-- start_time must be less than the end_time.
1081+-- | Optional. The time at which this sink will begin exporting log entries.
1082+-- Log entries are exported only if their timestamp is not earlier than the
1083+-- start time. The default value of this field is the time the sink is
1084+-- created or updated.
10081085lsStartTime :: Lens' LogSink (Maybe UTCTime)
10091086lsStartTime
10101087 = lens _lsStartTime (\ s a -> s{_lsStartTime = a}) .
10111088 mapping _DateTime
10121089
1013−-- | Optional. The log entry version to use for this sink\'s exported log
1014−-- entries. This version does not have to correspond to the version of the
1015−-- log entry that was written to Stackdriver Logging. If omitted, the v2
1016−-- format is used.
1090+-- | Optional. The log entry format to use for this sink\'s exported log
1091+-- entries. The v2 format is used by default. The v1 format is deprecated
1092+-- and should be used only as part of a migration effort to v2. See
1093+-- Migration to the v2 API.
10171094lsOutputVersionFormat :: Lens' LogSink (Maybe LogSinkOutputVersionFormat)
10181095lsOutputVersionFormat
10191096 = lens _lsOutputVersionFormat
10201097 (\ s a -> s{_lsOutputVersionFormat = a})
10211098
1022−-- | Output only. The IAM identity to which the destination needs to grant
1023−-- write access. This may be a service account or a group. Examples (Do not
1024−-- assume these specific values):
1025−-- \"serviceAccount:cloud-logs\'system.gserviceaccount.com\"
1026−-- \"group:cloud-logs\'google.com\" For GCS destinations, the role
1027−-- \"roles\/owner\" is required on the bucket For Cloud Pubsub
1028−-- destinations, the role \"roles\/pubsub.publisher\" is required on the
1029−-- topic For BigQuery, the role \"roles\/editor\" is required on the
1030−-- dataset
1099+-- | Output only. An IAM identity—a service account or group—under which
1100+-- Stackdriver Logging writes the exported log entries to the sink\'s
1101+-- destination. This field is set by sinks.create and sinks.update, based
1102+-- on the setting of unique_writer_identity in those methods.Until you
1103+-- grant this identity write-access to the destination, log entry exports
1104+-- from this sink will fail. For more information, see Granting access for
1105+-- a resource. Consult the destination service\'s documentation to
1106+-- determine the appropriate IAM roles to assign to the identity.
10311107lsWriterIdentity :: Lens' LogSink (Maybe Text)
10321108lsWriterIdentity
10331109 = lens _lsWriterIdentity
10341110 (\ s a -> s{_lsWriterIdentity = a})
10351111
10361112-- | Required. The client-assigned sink identifier, unique within the
1037−-- project. Example: \`\"my-syslog-errors-to-pubsub\"\`. Sink identifiers
1038−-- are limited to 1000 characters and can include only the following
1039−-- characters: \`A-Z\`, \`a-z\`, \`0-9\`, and the special characters
1040−-- \`_-.\`. The maximum length of the name is 100 characters.
1113+-- project. Example: \"my-syslog-errors-to-pubsub\". Sink identifiers are
1114+-- limited to 100 characters and can include only the following characters:
1115+-- upper and lower-case alphanumeric characters, underscores, hyphens, and
1116+-- periods.
10411117lsName :: Lens' LogSink (Maybe Text)
10421118lsName = lens _lsName (\ s a -> s{_lsName = a})
10431119
1044−-- | Optional. Time at which this sink expires.
1120+-- | Optional. The time at which this sink will stop exporting log entries.
1121+-- Log entries are exported only if their timestamp is earlier than the end
1122+-- time. If this field is not supplied, there is no end time. If both a
1123+-- start time and an end time are provided, then the end time must be later
1124+-- than the start time.
10451125lsEndTime :: Lens' LogSink (Maybe UTCTime)
10461126lsEndTime
10471127 = lens _lsEndTime (\ s a -> s{_lsEndTime = a}) .
10481128 mapping _DateTime
10491129
1050−-- | Optional. An [advanced logs
1051−-- filter](\/logging\/docs\/view\/advanced_filters). Only log entries
1052−-- matching the filter are exported. The filter must be consistent with the
1053−-- log entry format specified by the \`outputVersionFormat\` parameter,
1054−-- regardless of the format of the log entry that was originally written to
1055−-- Stackdriver Logging. Example filter (V2 format):
1056−-- logName=projects\/my-projectid\/logs\/syslog AND severity>=ERROR
1130+-- | Optional. An advanced logs filter. The only exported log entries are
1131+-- those that are in the resource owning the sink and that match the
1132+-- filter. The filter must use the log entry format specified by the
1133+-- output_version_format parameter. For example, in the v2 format:
1134+-- logName=\"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\" AND severity>=ERROR
10571135lsFilter :: Lens' LogSink (Maybe Text)
10581136lsFilter = lens _lsFilter (\ s a -> s{_lsFilter = a})
10591137
@@ -1082,6 +1160,60 @@ instance ToJSON LogSink where
10821160 ("endTime" .=) <$> _lsEndTime,
10831161 ("filter" .=) <$> _lsFilter])
10841162
1163+-- | Result returned from ListLogs.
1164+--
1165+-- /See:/ 'listLogsResponse' smart constructor.
1166+data ListLogsResponse = ListLogsResponse'
1167+ { _llrNextPageToken :: !(Maybe Text)
1168+ , _llrLogNames :: !(Maybe [Text])
1169+ } deriving (Eq,Show,Data,Typeable,Generic)
1170+
1171+-- | Creates a value of 'ListLogsResponse' with the minimum fields required to make a request.
1172+--
1173+-- Use one of the following lenses to modify other fields as desired:
1174+--
1175+-- * 'llrNextPageToken'
1176+--
1177+-- * 'llrLogNames'
1178+listLogsResponse
1179+ :: ListLogsResponse
1180+listLogsResponse =
1181+ ListLogsResponse'
1182+ { _llrNextPageToken = Nothing
1183+ , _llrLogNames = Nothing
1184+ }
1185+
1186+-- | If there might be more results than those appearing in this response,
1187+-- then nextPageToken is included. To get the next set of results, call
1188+-- this method again using the value of nextPageToken as pageToken.
1189+llrNextPageToken :: Lens' ListLogsResponse (Maybe Text)
1190+llrNextPageToken
1191+ = lens _llrNextPageToken
1192+ (\ s a -> s{_llrNextPageToken = a})
1193+
1194+-- | A list of log names. For example, \"projects\/my-project\/syslog\" or
1195+-- \"organizations\/123\/cloudresourcemanager.googleapis.com%2Factivity\".
1196+llrLogNames :: Lens' ListLogsResponse [Text]
1197+llrLogNames
1198+ = lens _llrLogNames (\ s a -> s{_llrLogNames = a}) .
1199+ _Default
1200+ . _Coerce
1201+
1202+instance FromJSON ListLogsResponse where
1203+ parseJSON
1204+ = withObject "ListLogsResponse"
1205+ (\ o ->
1206+ ListLogsResponse' <$>
1207+ (o .:? "nextPageToken") <*>
1208+ (o .:? "logNames" .!= mempty))
1209+
1210+instance ToJSON ListLogsResponse where
1211+ toJSON ListLogsResponse'{..}
1212+ = object
1213+ (catMaybes
1214+ [("nextPageToken" .=) <$> _llrNextPageToken,
1215+ ("logNames" .=) <$> _llrLogNames])
1216+
10851217-- | Result returned from ListMonitoredResourceDescriptors.
10861218--
10871219-- /See:/ 'listMonitoredResourceDescriptorsResponse' smart constructor.
@@ -1105,9 +1237,9 @@ listMonitoredResourceDescriptorsResponse =
11051237 , _lmrdrResourceDescriptors = Nothing
11061238 }
11071239
1108−-- | If there might be more results than appear in this response, then
1109−-- \`nextPageToken\` is included. To get the next set of results, call this
1110−-- method again using the value of \`nextPageToken\` as \`pageToken\`.
1240+-- | If there might be more results than those appearing in this response,
1241+-- then nextPageToken is included. To get the next set of results, call
1242+-- this method again using the value of nextPageToken as pageToken.
11111243lmrdrNextPageToken :: Lens' ListMonitoredResourceDescriptorsResponse (Maybe Text)
11121244lmrdrNextPageToken
11131245 = lens _lmrdrNextPageToken
@@ -1221,7 +1353,7 @@ httprStatus
12211353
12221354-- | The scheme (http, https), the host name, the path and the query portion
12231355-- of the URL that was requested. Example:
1224−-- \`\"http:\/\/example.com\/some\/info?color=red\"\`.
1356+-- \"http:\/\/example.com\/some\/info?color=red\".
12251357httprRequestURL :: Lens' HTTPRequest (Maybe Text)
12261358httprRequestURL
12271359 = lens _httprRequestURL
@@ -1236,8 +1368,7 @@ httprCacheFillBytes
12361368 . mapping _Coerce
12371369
12381370-- | The IP address (IPv4 or IPv6) of the client that issued the HTTP
1239−-- request. Examples: \`\"192.168.1.1\"\`,
1240−-- \`\"FE80::0202:B3FF:FE1E:8329\"\`.
1371+-- request. Examples: \"192.168.1.1\", \"FE80::0202:B3FF:FE1E:8329\".
12411372httprRemoteIP :: Lens' HTTPRequest (Maybe Text)
12421373httprRemoteIP
12431374 = lens _httprRemoteIP
@@ -1266,16 +1397,16 @@ httprRequestSize
12661397 . mapping _Coerce
12671398
12681399-- | Whether or not the response was validated with the origin server before
1269−-- being served from cache. This field is only meaningful if \`cache_hit\`
1270−-- is True.
1400+-- being served from cache. This field is only meaningful if cache_hit is
1401+-- True.
12711402httprCacheValidatedWithOriginServer :: Lens' HTTPRequest (Maybe Bool)
12721403httprCacheValidatedWithOriginServer
12731404 = lens _httprCacheValidatedWithOriginServer
12741405 (\ s a ->
12751406 s{_httprCacheValidatedWithOriginServer = a})
12761407
1277−-- | The user agent sent by the client. Example: \`\"Mozilla\/4.0
1278−-- (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\"\`.
1408+-- | The user agent sent by the client. Example: \"Mozilla\/4.0 (compatible;
1409+-- MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\".
12791410httprUserAgent :: Lens' HTTPRequest (Maybe Text)
12801411httprUserAgent
12811412 = lens _httprUserAgent
@@ -1295,8 +1426,7 @@ httprResponseSize
12951426 (\ s a -> s{_httprResponseSize = a})
12961427 . mapping _Coerce
12971428
1298−-- | The request method. Examples: \`\"GET\"\`, \`\"HEAD\"\`, \`\"PUT\"\`,
1299−-- \`\"POST\"\`.
1429+-- | The request method. Examples: \"GET\", \"HEAD\", \"PUT\", \"POST\".
13001430httprRequestMethod :: Lens' HTTPRequest (Maybe Text)
13011431httprRequestMethod
13021432 = lens _httprRequestMethod
@@ -1309,8 +1439,9 @@ httprCacheHit
13091439 = lens _httprCacheHit
13101440 (\ s a -> s{_httprCacheHit = a})
13111441
1312−-- | The referer URL of the request, as defined in [HTTP\/1.1 Header Field
1313−-- Definitions](http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html).
1442+-- | The referer URL of the request, as defined in HTTP\/1.1 Header Field
1443+-- Definitions
1444+-- (http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html).
13141445httprReferer :: Lens' HTTPRequest (Maybe Text)
13151446httprReferer
13161447 = lens _httprReferer (\ s a -> s{_httprReferer = a})
@@ -1354,10 +1485,10 @@ instance ToJSON HTTPRequest where
13541485 ("cacheHit" .=) <$> _httprCacheHit,
13551486 ("referer" .=) <$> _httprReferer])
13561487
1357−-- | Optional. Default labels that are added to the \`labels\` field of all
1358−-- log entries in \`entries\`. If a log entry already has a label with the
1359−-- same key as a label in this parameter, then the log entry\'s label is
1360−-- not changed. See LogEntry.
1488+-- | Optional. Default labels that are added to the labels field of all log
1489+-- entries in entries. If a log entry already has a label with the same key
1490+-- as a label in this parameter, then the log entry\'s label is not
1491+-- changed. See LogEntry.
13611492--
13621493-- /See:/ 'writeLogEntriesRequestLabels' smart constructor.
13631494newtype WriteLogEntriesRequestLabels = WriteLogEntriesRequestLabels'
@@ -1395,15 +1526,15 @@ instance ToJSON WriteLogEntriesRequestLabels where
13951526
13961527-- | An object representing a resource that can be used for monitoring,
13971528-- logging, billing, or other purposes. Examples include virtual machine
1398−-- instances, databases, and storage devices such as disks. The \`type\`
1399−-- field identifies a MonitoredResourceDescriptor object that describes the
1400−-- resource\'s schema. Information in the \`labels\` field identifies the
1529+-- instances, databases, and storage devices such as disks. The type field
1530+-- identifies a MonitoredResourceDescriptor object that describes the
1531+-- resource\'s schema. Information in the labels field identifies the
14011532-- actual resource and its attributes according to the schema. For example,
14021533-- a particular Compute Engine VM instance could be represented by the
14031534-- following object, because the MonitoredResourceDescriptor for
1404−-- \`\"gce_instance\"\` has labels \`\"instance_id\"\` and \`\"zone\"\`: {
1405−-- \"type\": \"gce_instance\", \"labels\": { \"instance_id\":
1406−-- \"12345678901234\", \"zone\": \"us-central1-a\" }}
1535+-- \"gce_instance\" has labels \"instance_id\" and \"zone\": { \"type\":
1536+-- \"gce_instance\", \"labels\": { \"instance_id\": \"12345678901234\",
1537+-- \"zone\": \"us-central1-a\" }}
14071538--
14081539-- /See:/ 'monitoredResource' smart constructor.
14091540data MonitoredResource = MonitoredResource'
@@ -1428,13 +1559,13 @@ monitoredResource =
14281559
14291560-- | Required. Values for all of the labels listed in the associated
14301561-- monitored resource descriptor. For example, Cloud SQL databases use the
1431−-- labels \`\"database_id\"\` and \`\"zone\"\`.
1562+-- labels \"database_id\" and \"zone\".
14321563mrLabels :: Lens' MonitoredResource (Maybe MonitoredResourceLabels)
14331564mrLabels = lens _mrLabels (\ s a -> s{_mrLabels = a})
14341565
1435−-- | Required. The monitored resource type. This field must match the
1436−-- \`type\` field of a MonitoredResourceDescriptor object. For example, the
1437−-- type of a Cloud SQL database is \`\"cloudsql_database\"\`.
1566+-- | Required. The monitored resource type. This field must match the type
1567+-- field of a MonitoredResourceDescriptor object. For example, the type of
1568+-- a Cloud SQL database is \"cloudsql_database\".
14381569mrType :: Lens' MonitoredResource (Maybe Text)
14391570mrType = lens _mrType (\ s a -> s{_mrType = a})
14401571
@@ -1581,7 +1712,7 @@ instance ToJSON LabelDescriptor where
15811712 ("valueType" .=) <$> _ldValueType,
15821713 ("description" .=) <$> _ldDescription])
15831714
1584−-- | The parameters to \`ListLogEntries\`.
1715+-- | The parameters to ListLogEntries.
15851716--
15861717-- /See:/ 'listLogEntriesRequest' smart constructor.
15871718data ListLogEntriesRequest = ListLogEntriesRequest'
@@ -1621,21 +1752,20 @@ listLogEntriesRequest =
16211752 }
16221753
16231754-- | Optional. How the results should be sorted. Presently, the only
1624−-- permitted values are \`\"timestamp asc\"\` (default) and \`\"timestamp
1625−-- desc\"\`. The first option returns entries in order of increasing values
1626−-- of \`LogEntry.timestamp\` (oldest first), and the second option returns
1627−-- entries in order of decreasing timestamps (newest first). Entries with
1628−-- equal timestamps are returned in order of \`LogEntry.insertId\`.
1755+-- permitted values are \"timestamp asc\" (default) and \"timestamp desc\".
1756+-- The first option returns entries in order of increasing values of
1757+-- LogEntry.timestamp (oldest first), and the second option returns entries
1758+-- in order of decreasing timestamps (newest first). Entries with equal
1759+-- timestamps are returned in order of LogEntry.insertId.
16291760llerOrderBy :: Lens' ListLogEntriesRequest (Maybe Text)
16301761llerOrderBy
16311762 = lens _llerOrderBy (\ s a -> s{_llerOrderBy = a})
16321763
1633−-- | Deprecated. One or more project identifiers or project numbers from
1634−-- which to retrieve log entries. Examples: \`\"my-project-1A\"\`,
1635−-- \`\"1234567890\"\`. If present, these project identifiers are converted
1636−-- to resource format and added to the list of resources in
1637−-- \`resourceNames\`. Callers should use \`resourceNames\` rather than this
1638−-- parameter.
1764+-- | Deprecated. Use resource_names instead. One or more project identifiers
1765+-- or project numbers from which to retrieve log entries. Example:
1766+-- \"my-project-1A\". If present, these project identifiers are converted
1767+-- to resource name format and added to the list of resources in
1768+-- resource_names.
16391769llerProjectIds :: Lens' ListLogEntriesRequest [Text]
16401770llerProjectIds
16411771 = lens _llerProjectIds
@@ -1644,16 +1774,18 @@ llerProjectIds
16441774 . _Coerce
16451775
16461776-- | Optional. A filter that chooses which log entries to return. See
1647−-- [Advanced Logs Filters](\/logging\/docs\/view\/advanced_filters). Only
1648−-- log entries that match the filter are returned. An empty filter matches
1649−-- all log entries.
1777+-- Advanced Logs Filters. Only log entries that match the filter are
1778+-- returned. An empty filter matches all log entries in the resources
1779+-- listed in resource_names. Referencing a parent resource that is not
1780+-- listed in resource_names will cause the filter to return no results. The
1781+-- maximum length of the filter is 20000 characters.
16501782llerFilter :: Lens' ListLogEntriesRequest (Maybe Text)
16511783llerFilter
16521784 = lens _llerFilter (\ s a -> s{_llerFilter = a})
16531785
16541786-- | Optional. If present, then retrieve the next batch of results from the
1655−-- preceding call to this method. \`pageToken\` must be the value of
1656−-- \`nextPageToken\` from the previous response. The values of other method
1787+-- preceding call to this method. pageToken must be the value of
1788+-- nextPageToken from the previous response. The values of other method
16571789-- parameters should be identical to those in the previous call.
16581790llerPageToken :: Lens' ListLogEntriesRequest (Maybe Text)
16591791llerPageToken
@@ -1661,17 +1793,16 @@ llerPageToken
16611793 (\ s a -> s{_llerPageToken = a})
16621794
16631795-- | Optional. The maximum number of results to return from this request.
1664−-- Non-positive values are ignored. The presence of \`nextPageToken\` in
1665−-- the response indicates that more results might be available.
1796+-- Non-positive values are ignored. The presence of nextPageToken in the
1797+-- response indicates that more results might be available.
16661798llerPageSize :: Lens' ListLogEntriesRequest (Maybe Int32)
16671799llerPageSize
16681800 = lens _llerPageSize (\ s a -> s{_llerPageSize = a})
16691801 . mapping _Coerce
16701802
1671−-- | Required. One or more cloud resources from which to retrieve log
1672−-- entries. Example: \`\"projects\/my-project-1A\"\`,
1673−-- \`\"projects\/1234567890\"\`. Projects listed in \`projectIds\` are
1674−-- added to this list.
1803+-- | Required. Names of one or more resources from which to retrieve log
1804+-- entries: \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
1805+-- Projects listed in the project_ids field are added to this list.
16751806llerResourceNames :: Lens' ListLogEntriesRequest [Text]
16761807llerResourceNames
16771808 = lens _llerResourceNames
@@ -1738,10 +1869,10 @@ logEntryOperation =
17381869leoFirst :: Lens' LogEntryOperation (Maybe Bool)
17391870leoFirst = lens _leoFirst (\ s a -> s{_leoFirst = a})
17401871
1741−-- | Optional. An arbitrary producer identifier. The combination of \`id\`
1742−-- and \`producer\` must be globally unique. Examples for \`producer\`:
1743−-- \`\"MyDivision.MyBigCompany.com\"\`,
1744−-- \`\"github.com\/MyProject\/MyApplication\"\`.
1872+-- | Optional. An arbitrary producer identifier. The combination of id and
1873+-- producer must be globally unique. Examples for producer:
1874+-- \"MyDivision.MyBigCompany.com\",
1875+-- \"github.com\/MyProject\/MyApplication\".
17451876leoProducer :: Lens' LogEntryOperation (Maybe Text)
17461877leoProducer
17471878 = lens _leoProducer (\ s a -> s{_leoProducer = a})
@@ -1774,7 +1905,7 @@ instance ToJSON LogEntryOperation where
17741905 ("last" .=) <$> _leoLast, ("id" .=) <$> _leoId])
17751906
17761907-- | Describes a logs-based metric. The value of the metric is the number of
1777−-- log entries that match a logs filter.
1908+-- log entries that match a logs filter in a given time interval.
17781909--
17791910-- /See:/ 'logMetric' smart constructor.
17801911data LogMetric = LogMetric'
@@ -1805,14 +1936,17 @@ logMetric =
18051936 , _lmDescription = Nothing
18061937 }
18071938
1808−-- | Required. The client-assigned metric identifier. Example:
1809−-- \`\"severe_errors\"\`. Metric identifiers are limited to 100 characters
1810−-- and can include only the following characters: \`A-Z\`, \`a-z\`,
1811−-- \`0-9\`, and the special characters \`_-.,+!*\',()%\/\`. The
1812−-- forward-slash character (\`\/\`) denotes a hierarchy of name pieces, and
1813−-- it cannot be the first character of the name. The \'%\' character is
1814−-- used to URL encode unsafe and reserved characters and must be followed
1815−-- by two hexadecimal digits according to RFC 1738.
1939+-- | Required. The client-assigned metric identifier. Examples:
1940+-- \"error_count\", \"nginx\/requests\".Metric identifiers are limited to
1941+-- 100 characters and can include only the following characters: A-Z, a-z,
1942+-- 0-9, and the special characters _-.,+!*\',()%\/. The forward-slash
1943+-- character (\/) denotes a hierarchy of name pieces, and it cannot be the
1944+-- first character of the name.The metric identifier in this field must not
1945+-- be URL-encoded (https:\/\/en.wikipedia.org\/wiki\/Percent-encoding).
1946+-- However, when the metric identifier appears as the [METRIC_ID] part of a
1947+-- metric_name API parameter, then the metric identifier must be
1948+-- URL-encoded. Example:
1949+-- \"projects\/my-project\/metrics\/nginx%2Frequests\".
18161950lmName :: Lens' LogMetric (Maybe Text)
18171951lmName = lens _lmName (\ s a -> s{_lmName = a})
18181952
@@ -1823,9 +1957,9 @@ lmVersion :: Lens' LogMetric (Maybe LogMetricVersion)
18231957lmVersion
18241958 = lens _lmVersion (\ s a -> s{_lmVersion = a})
18251959
1826−-- | Required. An [advanced logs
1827−-- filter](\/logging\/docs\/view\/advanced_filters). Example:
1828−-- \`\"resource.type=gae_app AND severity>=ERROR\"\`.
1960+-- | Required. An advanced logs filter which is used to match log entries.
1961+-- Example: \"resource.type=gae_app AND severity>=ERROR\" The maximum
1962+-- length of the filter is 20000 characters.
18291963lmFilter :: Lens' LogMetric (Maybe Text)
18301964lmFilter = lens _lmFilter (\ s a -> s{_lmFilter = a})
18311965
@@ -1857,17 +1991,19 @@ instance ToJSON LogMetric where
18571991--
18581992-- /See:/ 'logEntry' smart constructor.
18591993data LogEntry = LogEntry'
1860− { _leOperation :: !(Maybe LogEntryOperation)
1861− , _leSeverity :: !(Maybe LogEntrySeverity)
1862− , _leTextPayload :: !(Maybe Text)
1863− , _leJSONPayload :: !(Maybe LogEntryJSONPayload)
1864− , _leHTTPRequest :: !(Maybe HTTPRequest)
1865− , _leResource :: !(Maybe MonitoredResource)
1866− , _leInsertId :: !(Maybe Text)
1867− , _leLabels :: !(Maybe LogEntryLabels)
1868− , _leProtoPayload :: !(Maybe LogEntryProtoPayload)
1869− , _leLogName :: !(Maybe Text)
1870− , _leTimestamp :: !(Maybe DateTime')
1994+ { _leOperation :: !(Maybe LogEntryOperation)
1995+ , _leSeverity :: !(Maybe LogEntrySeverity)
1996+ , _leTextPayload :: !(Maybe Text)
1997+ , _leJSONPayload :: !(Maybe LogEntryJSONPayload)
1998+ , _leHTTPRequest :: !(Maybe HTTPRequest)
1999+ , _leResource :: !(Maybe MonitoredResource)
2000+ , _leInsertId :: !(Maybe Text)
2001+ , _leLabels :: !(Maybe LogEntryLabels)
2002+ , _leProtoPayload :: !(Maybe LogEntryProtoPayload)
2003+ , _leSourceLocation :: !(Maybe LogEntrySourceLocation)
2004+ , _leLogName :: !(Maybe Text)
2005+ , _leTimestamp :: !(Maybe DateTime')
2006+ , _leTrace :: !(Maybe Text)
18712007 } deriving (Eq,Show,Data,Typeable,Generic)
18722008
18732009-- | Creates a value of 'LogEntry' with the minimum fields required to make a request.
@@ -1892,9 +2028,13 @@ data LogEntry = LogEntry'
18922028--
18932029-- * 'leProtoPayload'
18942030--
2031+-- * 'leSourceLocation'
2032+--
18952033-- * 'leLogName'
18962034--
18972035-- * 'leTimestamp'
2036+--
2037+-- * 'leTrace'
18982038logEntry
18992039 :: LogEntry
19002040logEntry =
@@ -1908,8 +2048,10 @@ logEntry =
19082048 , _leInsertId = Nothing
19092049 , _leLabels = Nothing
19102050 , _leProtoPayload = Nothing
2051+ , _leSourceLocation = Nothing
19112052 , _leLogName = Nothing
19122053 , _leTimestamp = Nothing
2054+ , _leTrace = Nothing
19132055 }
19142056
19152057-- | Optional. Information about an operation associated with the log entry,
@@ -1919,7 +2061,7 @@ leOperation
19192061 = lens _leOperation (\ s a -> s{_leOperation = a})
19202062
19212063-- | Optional. The severity of the log entry. The default value is
1922−-- \`LogSeverity.DEFAULT\`.
2064+-- LogSeverity.DEFAULT.
19232065leSeverity :: Lens' LogEntry (Maybe LogEntrySeverity)
19242066leSeverity
19252067 = lens _leSeverity (\ s a -> s{_leSeverity = a})
@@ -1972,15 +2114,26 @@ leProtoPayload
19722114 = lens _leProtoPayload
19732115 (\ s a -> s{_leProtoPayload = a})
19742116
1975−-- | Required. The resource name of the log to which this log entry belongs.
1976−-- The format of the name is \`\"projects\/\/logs\/\"\`. Examples:
1977−-- \`\"projects\/my-projectid\/logs\/syslog\"\`,
1978−-- \`\"projects\/my-projectid\/logs\/library.googleapis.com%2Fbook_log\"\`.
1979−-- The log ID part of resource name must be less than 512 characters long
1980−-- and can only include the following characters: upper and lower case
1981−-- alphanumeric characters: [A-Za-z0-9]; and punctuation characters:
1982−-- forward-slash, underscore, hyphen, and period. Forward-slash (\`\/\`)
1983−-- characters in the log ID must be URL-encoded.
2117+-- | Optional. Source code location information associated with the log
2118+-- entry, if any.
2119+leSourceLocation :: Lens' LogEntry (Maybe LogEntrySourceLocation)
2120+leSourceLocation
2121+ = lens _leSourceLocation
2122+ (\ s a -> s{_leSourceLocation = a})
2123+
2124+-- | Required. The resource name of the log to which this log entry belongs:
2125+-- \"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\"
2126+-- \"organizations\/[ORGANIZATION_ID]\/logs\/[LOG_ID]\" [LOG_ID] must be
2127+-- URL-encoded within log_name. Example:
2128+-- \"organizations\/1234567890\/logs\/cloudresourcemanager.googleapis.com%2Factivity\".
2129+-- [LOG_ID] must be less than 512 characters long and can only include the
2130+-- following characters: upper and lower case alphanumeric characters,
2131+-- forward-slash, underscore, hyphen, and period.For backward
2132+-- compatibility, if log_name begins with a forward-slash, such as
2133+-- \/projects\/..., then the log entry is ingested as usual but the
2134+-- forward-slash is removed. Listing the log entry will not show the
2135+-- leading slash and filtering for a log name with a leading slash will
2136+-- never return any results.
19842137leLogName :: Lens' LogEntry (Maybe Text)
19852138leLogName
19862139 = lens _leLogName (\ s a -> s{_leLogName = a})
@@ -1993,6 +2146,13 @@ leTimestamp
19932146 = lens _leTimestamp (\ s a -> s{_leTimestamp = a}) .
19942147 mapping _DateTime
19952148
2149+-- | Optional. Resource name of the trace associated with the log entry, if
2150+-- any. If it contains a relative resource name, the name is assumed to be
2151+-- relative to \/\/tracing.googleapis.com. Example:
2152+-- projects\/my-projectid\/traces\/06796866738c859f2f19b7cfb3214824
2153+leTrace :: Lens' LogEntry (Maybe Text)
2154+leTrace = lens _leTrace (\ s a -> s{_leTrace = a})
2155+
19962156instance FromJSON LogEntry where
19972157 parseJSON
19982158 = withObject "LogEntry"
@@ -2006,8 +2166,10 @@ instance FromJSON LogEntry where
20062166 <*> (o .:? "insertId")
20072167 <*> (o .:? "labels")
20082168 <*> (o .:? "protoPayload")
2169+ <*> (o .:? "sourceLocation")
20092170 <*> (o .:? "logName")
2010− <*> (o .:? "timestamp"))
2171+ <*> (o .:? "timestamp")
2172+ <*> (o .:? "trace"))
20112173
20122174instance ToJSON LogEntry where
20132175 toJSON LogEntry'{..}
@@ -2022,8 +2184,10 @@ instance ToJSON LogEntry where
20222184 ("insertId" .=) <$> _leInsertId,
20232185 ("labels" .=) <$> _leLabels,
20242186 ("protoPayload" .=) <$> _leProtoPayload,
2187+ ("sourceLocation" .=) <$> _leSourceLocation,
20252188 ("logName" .=) <$> _leLogName,
2026− ("timestamp" .=) <$> _leTimestamp])
2189+ ("timestamp" .=) <$> _leTimestamp,
2190+ ("trace" .=) <$> _leTrace])
20272191
20282192-- | Specifies a location in a source code file.
20292193--
@@ -2062,8 +2226,8 @@ slLine
20622226-- optional context such as the class or package name. This information is
20632227-- used in contexts such as the logs viewer, where a file and line number
20642228-- are less meaningful. The format can vary by language. For example:
2065−-- \`qual.if.ied.Class.method\` (Java), \`dir\/package.func\` (Go),
2066−-- \`function\` (Python).
2229+-- qual.if.ied.Class.method (Java), dir\/package.func (Go), function
2230+-- (Python).
20672231slFunctionName :: Lens' SourceLocation (Maybe Text)
20682232slFunctionName
20692233 = lens _slFunctionName
gogol-logging/gen/Network/Google/Logging/Types/Sum.hs+8−8
@@ -49,20 +49,20 @@ instance FromJSON LogMetricVersion where
4949instance ToJSON LogMetricVersion where
5050 toJSON = toJSONText
5151
52−-- | Optional. The log entry version to use for this sink\'s exported log
53−-- entries. This version does not have to correspond to the version of the
54−-- log entry that was written to Stackdriver Logging. If omitted, the v2
55−-- format is used.
52+-- | Optional. The log entry format to use for this sink\'s exported log
53+-- entries. The v2 format is used by default. The v1 format is deprecated
54+-- and should be used only as part of a migration effort to v2. See
55+-- Migration to the v2 API.
5656data LogSinkOutputVersionFormat
5757 = LSOVFVersionFormatUnspecified
5858 -- ^ @VERSION_FORMAT_UNSPECIFIED@
59− -- An unspecified version format will default to V2.
59+ -- An unspecified format version that will default to V2.
6060 | LSOVFV2
6161 -- ^ @V2@
62− -- \`LogEntry\` version 2 format.
62+ -- LogEntry version 2 format.
6363 | LSOVFV1
6464 -- ^ @V1@
65− -- \`LogEntry\` version 1 format.
65+ -- LogEntry version 1 format.
6666 deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)
6767
6868instance Hashable LogSinkOutputVersionFormat
@@ -150,7 +150,7 @@ instance ToJSON Xgafv where
150150 toJSON = toJSONText
151151
152152-- | Optional. The severity of the log entry. The default value is
153−-- \`LogSeverity.DEFAULT\`.
153+-- LogSeverity.DEFAULT.
154154data LogEntrySeverity
155155 = Default
156156 -- ^ @DEFAULT@
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Logs/Delete.hs+10−6
@@ -20,8 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Deletes a log and all its log entries. The log will reappear if it
24−-- receives new entries.
23+-- Deletes all the log entries in a log. The log reappears if it receives
24+-- new entries.
2525--
2626-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.logs.delete@.
2727module Network.Google.Resource.Logging.BillingAccounts.Logs.Delete
@@ -61,8 +61,8 @@ type BillingAccountsLogsDeleteResource =
6161 QueryParam "callback" Text :>
6262 QueryParam "alt" AltJSON :> Delete '[JSON] Empty
6363
64−-- | Deletes a log and all its log entries. The log will reappear if it
65−-- receives new entries.
64+-- | Deletes all the log entries in a log. The log reappears if it receives
65+-- new entries.
6666--
6767-- /See:/ 'billingAccountsLogsDelete' smart constructor.
6868data BillingAccountsLogsDelete = BillingAccountsLogsDelete'
@@ -143,8 +143,12 @@ baldBearerToken
143143 = lens _baldBearerToken
144144 (\ s a -> s{_baldBearerToken = a})
145145
146−-- | Required. The resource name of the log to delete. Example:
147−-- \`\"projects\/my-project\/logs\/syslog\"\`.
146+-- | Required. The resource name of the log to delete:
147+-- \"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\"
148+-- \"organizations\/[ORGANIZATION_ID]\/logs\/[LOG_ID]\" [LOG_ID] must be
149+-- URL-encoded. For example, \"projects\/my-project-id\/logs\/syslog\",
150+-- \"organizations\/1234567890\/logs\/cloudresourcemanager.googleapis.com%2Factivity\".
151+-- For more information about log names, see LogEntry.
148152baldLogName :: Lens' BillingAccountsLogsDelete Text
149153baldLogName
150154 = lens _baldLogName (\ s a -> s{_baldLogName = a})
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Logs/List.hsnew file+209
@@ -0,0 +1,209 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.BillingAccounts.Logs.List
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)
22+--
23+-- Lists the logs in projects or organizations. Only logs that have entries
24+-- are listed.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.logs.list@.
27+module Network.Google.Resource.Logging.BillingAccounts.Logs.List
28+ (
29+ -- * REST Resource
30+ BillingAccountsLogsListResource
31+
32+ -- * Creating a Request
33+ , billingAccountsLogsList
34+ , BillingAccountsLogsList
35+
36+ -- * Request Lenses
37+ , ballParent
38+ , ballXgafv
39+ , ballUploadProtocol
40+ , ballPp
41+ , ballAccessToken
42+ , ballUploadType
43+ , ballBearerToken
44+ , ballPageToken
45+ , ballPageSize
46+ , ballCallback
47+ ) where
48+
49+import Network.Google.Logging.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @logging.billingAccounts.logs.list@ method which the
53+-- 'BillingAccountsLogsList' request conforms to.
54+type BillingAccountsLogsListResource =
55+ "v2" :>
56+ Capture "parent" Text :>
57+ "logs" :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "pageToken" Text :>
65+ QueryParam "pageSize" (Textual Int32) :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ Get '[JSON] ListLogsResponse
69+
70+-- | Lists the logs in projects or organizations. Only logs that have entries
71+-- are listed.
72+--
73+-- /See:/ 'billingAccountsLogsList' smart constructor.
74+data BillingAccountsLogsList = BillingAccountsLogsList'
75+ { _ballParent :: !Text
76+ , _ballXgafv :: !(Maybe Xgafv)
77+ , _ballUploadProtocol :: !(Maybe Text)
78+ , _ballPp :: !Bool
79+ , _ballAccessToken :: !(Maybe Text)
80+ , _ballUploadType :: !(Maybe Text)
81+ , _ballBearerToken :: !(Maybe Text)
82+ , _ballPageToken :: !(Maybe Text)
83+ , _ballPageSize :: !(Maybe (Textual Int32))
84+ , _ballCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'BillingAccountsLogsList' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'ballParent'
92+--
93+-- * 'ballXgafv'
94+--
95+-- * 'ballUploadProtocol'
96+--
97+-- * 'ballPp'
98+--
99+-- * 'ballAccessToken'
100+--
101+-- * 'ballUploadType'
102+--
103+-- * 'ballBearerToken'
104+--
105+-- * 'ballPageToken'
106+--
107+-- * 'ballPageSize'
108+--
109+-- * 'ballCallback'
110+billingAccountsLogsList
111+ :: Text -- ^ 'ballParent'
112+ -> BillingAccountsLogsList
113+billingAccountsLogsList pBallParent_ =
114+ BillingAccountsLogsList'
115+ { _ballParent = pBallParent_
116+ , _ballXgafv = Nothing
117+ , _ballUploadProtocol = Nothing
118+ , _ballPp = True
119+ , _ballAccessToken = Nothing
120+ , _ballUploadType = Nothing
121+ , _ballBearerToken = Nothing
122+ , _ballPageToken = Nothing
123+ , _ballPageSize = Nothing
124+ , _ballCallback = Nothing
125+ }
126+
127+-- | Required. The resource name that owns the logs:
128+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
129+ballParent :: Lens' BillingAccountsLogsList Text
130+ballParent
131+ = lens _ballParent (\ s a -> s{_ballParent = a})
132+
133+-- | V1 error format.
134+ballXgafv :: Lens' BillingAccountsLogsList (Maybe Xgafv)
135+ballXgafv
136+ = lens _ballXgafv (\ s a -> s{_ballXgafv = a})
137+
138+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
139+ballUploadProtocol :: Lens' BillingAccountsLogsList (Maybe Text)
140+ballUploadProtocol
141+ = lens _ballUploadProtocol
142+ (\ s a -> s{_ballUploadProtocol = a})
143+
144+-- | Pretty-print response.
145+ballPp :: Lens' BillingAccountsLogsList Bool
146+ballPp = lens _ballPp (\ s a -> s{_ballPp = a})
147+
148+-- | OAuth access token.
149+ballAccessToken :: Lens' BillingAccountsLogsList (Maybe Text)
150+ballAccessToken
151+ = lens _ballAccessToken
152+ (\ s a -> s{_ballAccessToken = a})
153+
154+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
155+ballUploadType :: Lens' BillingAccountsLogsList (Maybe Text)
156+ballUploadType
157+ = lens _ballUploadType
158+ (\ s a -> s{_ballUploadType = a})
159+
160+-- | OAuth bearer token.
161+ballBearerToken :: Lens' BillingAccountsLogsList (Maybe Text)
162+ballBearerToken
163+ = lens _ballBearerToken
164+ (\ s a -> s{_ballBearerToken = a})
165+
166+-- | Optional. If present, then retrieve the next batch of results from the
167+-- preceding call to this method. pageToken must be the value of
168+-- nextPageToken from the previous response. The values of other method
169+-- parameters should be identical to those in the previous call.
170+ballPageToken :: Lens' BillingAccountsLogsList (Maybe Text)
171+ballPageToken
172+ = lens _ballPageToken
173+ (\ s a -> s{_ballPageToken = a})
174+
175+-- | Optional. The maximum number of results to return from this request.
176+-- Non-positive values are ignored. The presence of nextPageToken in the
177+-- response indicates that more results might be available.
178+ballPageSize :: Lens' BillingAccountsLogsList (Maybe Int32)
179+ballPageSize
180+ = lens _ballPageSize (\ s a -> s{_ballPageSize = a})
181+ . mapping _Coerce
182+
183+-- | JSONP
184+ballCallback :: Lens' BillingAccountsLogsList (Maybe Text)
185+ballCallback
186+ = lens _ballCallback (\ s a -> s{_ballCallback = a})
187+
188+instance GoogleRequest BillingAccountsLogsList where
189+ type Rs BillingAccountsLogsList = ListLogsResponse
190+ type Scopes BillingAccountsLogsList =
191+ '["https://www.googleapis.com/auth/cloud-platform",
192+ "https://www.googleapis.com/auth/cloud-platform.read-only",
193+ "https://www.googleapis.com/auth/logging.admin",
194+ "https://www.googleapis.com/auth/logging.read"]
195+ requestClient BillingAccountsLogsList'{..}
196+ = go _ballParent _ballXgafv _ballUploadProtocol
197+ (Just _ballPp)
198+ _ballAccessToken
199+ _ballUploadType
200+ _ballBearerToken
201+ _ballPageToken
202+ _ballPageSize
203+ _ballCallback
204+ (Just AltJSON)
205+ loggingService
206+ where go
207+ = buildClient
208+ (Proxy :: Proxy BillingAccountsLogsListResource)
209+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Create.hsnew file+219
@@ -0,0 +1,219 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.BillingAccounts.Sinks.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)
22+--
23+-- Creates a sink that exports specified log entries to a destination. The
24+-- export of newly-ingested log entries begins immediately, unless the
25+-- current time is outside the sink\'s start and end times or the sink\'s
26+-- writer_identity is not permitted to write to the destination. A sink can
27+-- export log entries only from the resource owning the sink.
28+--
29+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.sinks.create@.
30+module Network.Google.Resource.Logging.BillingAccounts.Sinks.Create
31+ (
32+ -- * REST Resource
33+ BillingAccountsSinksCreateResource
34+
35+ -- * Creating a Request
36+ , billingAccountsSinksCreate
37+ , BillingAccountsSinksCreate
38+
39+ -- * Request Lenses
40+ , bascParent
41+ , bascXgafv
42+ , bascUniqueWriterIdentity
43+ , bascUploadProtocol
44+ , bascPp
45+ , bascAccessToken
46+ , bascUploadType
47+ , bascPayload
48+ , bascBearerToken
49+ , bascCallback
50+ ) where
51+
52+import Network.Google.Logging.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @logging.billingAccounts.sinks.create@ method which the
56+-- 'BillingAccountsSinksCreate' request conforms to.
57+type BillingAccountsSinksCreateResource =
58+ "v2" :>
59+ Capture "parent" Text :>
60+ "sinks" :>
61+ QueryParam "$.xgafv" Xgafv :>
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Post '[JSON] LogSink
71+
72+-- | Creates a sink that exports specified log entries to a destination. The
73+-- export of newly-ingested log entries begins immediately, unless the
74+-- current time is outside the sink\'s start and end times or the sink\'s
75+-- writer_identity is not permitted to write to the destination. A sink can
76+-- export log entries only from the resource owning the sink.
77+--
78+-- /See:/ 'billingAccountsSinksCreate' smart constructor.
79+data BillingAccountsSinksCreate = BillingAccountsSinksCreate'
80+ { _bascParent :: !Text
81+ , _bascXgafv :: !(Maybe Xgafv)
82+ , _bascUniqueWriterIdentity :: !(Maybe Bool)
83+ , _bascUploadProtocol :: !(Maybe Text)
84+ , _bascPp :: !Bool
85+ , _bascAccessToken :: !(Maybe Text)
86+ , _bascUploadType :: !(Maybe Text)
87+ , _bascPayload :: !LogSink
88+ , _bascBearerToken :: !(Maybe Text)
89+ , _bascCallback :: !(Maybe Text)
90+ } deriving (Eq,Show,Data,Typeable,Generic)
91+
92+-- | Creates a value of 'BillingAccountsSinksCreate' with the minimum fields required to make a request.
93+--
94+-- Use one of the following lenses to modify other fields as desired:
95+--
96+-- * 'bascParent'
97+--
98+-- * 'bascXgafv'
99+--
100+-- * 'bascUniqueWriterIdentity'
101+--
102+-- * 'bascUploadProtocol'
103+--
104+-- * 'bascPp'
105+--
106+-- * 'bascAccessToken'
107+--
108+-- * 'bascUploadType'
109+--
110+-- * 'bascPayload'
111+--
112+-- * 'bascBearerToken'
113+--
114+-- * 'bascCallback'
115+billingAccountsSinksCreate
116+ :: Text -- ^ 'bascParent'
117+ -> LogSink -- ^ 'bascPayload'
118+ -> BillingAccountsSinksCreate
119+billingAccountsSinksCreate pBascParent_ pBascPayload_ =
120+ BillingAccountsSinksCreate'
121+ { _bascParent = pBascParent_
122+ , _bascXgafv = Nothing
123+ , _bascUniqueWriterIdentity = Nothing
124+ , _bascUploadProtocol = Nothing
125+ , _bascPp = True
126+ , _bascAccessToken = Nothing
127+ , _bascUploadType = Nothing
128+ , _bascPayload = pBascPayload_
129+ , _bascBearerToken = Nothing
130+ , _bascCallback = Nothing
131+ }
132+
133+-- | Required. The resource in which to create the sink:
134+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
135+-- Examples: \"projects\/my-logging-project\",
136+-- \"organizations\/123456789\".
137+bascParent :: Lens' BillingAccountsSinksCreate Text
138+bascParent
139+ = lens _bascParent (\ s a -> s{_bascParent = a})
140+
141+-- | V1 error format.
142+bascXgafv :: Lens' BillingAccountsSinksCreate (Maybe Xgafv)
143+bascXgafv
144+ = lens _bascXgafv (\ s a -> s{_bascXgafv = a})
145+
146+-- | Optional. Determines the kind of IAM identity returned as
147+-- writer_identity in the new sink. If this value is omitted or set to
148+-- false, and if the sink\'s parent is a project, then the value returned
149+-- as writer_identity is cloud-logs\'google.com, the same identity used
150+-- before the addition of writer identities to this API. The sink\'s
151+-- destination must be in the same project as the sink itself.If this field
152+-- is set to true, or if the sink is owned by a non-project resource such
153+-- as an organization, then the value of writer_identity will be a unique
154+-- service account used only for exports from the new sink. For more
155+-- information, see writer_identity in LogSink.
156+bascUniqueWriterIdentity :: Lens' BillingAccountsSinksCreate (Maybe Bool)
157+bascUniqueWriterIdentity
158+ = lens _bascUniqueWriterIdentity
159+ (\ s a -> s{_bascUniqueWriterIdentity = a})
160+
161+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
162+bascUploadProtocol :: Lens' BillingAccountsSinksCreate (Maybe Text)
163+bascUploadProtocol
164+ = lens _bascUploadProtocol
165+ (\ s a -> s{_bascUploadProtocol = a})
166+
167+-- | Pretty-print response.
168+bascPp :: Lens' BillingAccountsSinksCreate Bool
169+bascPp = lens _bascPp (\ s a -> s{_bascPp = a})
170+
171+-- | OAuth access token.
172+bascAccessToken :: Lens' BillingAccountsSinksCreate (Maybe Text)
173+bascAccessToken
174+ = lens _bascAccessToken
175+ (\ s a -> s{_bascAccessToken = a})
176+
177+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
178+bascUploadType :: Lens' BillingAccountsSinksCreate (Maybe Text)
179+bascUploadType
180+ = lens _bascUploadType
181+ (\ s a -> s{_bascUploadType = a})
182+
183+-- | Multipart request metadata.
184+bascPayload :: Lens' BillingAccountsSinksCreate LogSink
185+bascPayload
186+ = lens _bascPayload (\ s a -> s{_bascPayload = a})
187+
188+-- | OAuth bearer token.
189+bascBearerToken :: Lens' BillingAccountsSinksCreate (Maybe Text)
190+bascBearerToken
191+ = lens _bascBearerToken
192+ (\ s a -> s{_bascBearerToken = a})
193+
194+-- | JSONP
195+bascCallback :: Lens' BillingAccountsSinksCreate (Maybe Text)
196+bascCallback
197+ = lens _bascCallback (\ s a -> s{_bascCallback = a})
198+
199+instance GoogleRequest BillingAccountsSinksCreate
200+ where
201+ type Rs BillingAccountsSinksCreate = LogSink
202+ type Scopes BillingAccountsSinksCreate =
203+ '["https://www.googleapis.com/auth/cloud-platform",
204+ "https://www.googleapis.com/auth/logging.admin"]
205+ requestClient BillingAccountsSinksCreate'{..}
206+ = go _bascParent _bascXgafv _bascUniqueWriterIdentity
207+ _bascUploadProtocol
208+ (Just _bascPp)
209+ _bascAccessToken
210+ _bascUploadType
211+ _bascBearerToken
212+ _bascCallback
213+ (Just AltJSON)
214+ _bascPayload
215+ loggingService
216+ where go
217+ = buildClient
218+ (Proxy :: Proxy BillingAccountsSinksCreateResource)
219+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Delete.hsnew file+180
@@ -0,0 +1,180 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.BillingAccounts.Sinks.Delete
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)
22+--
23+-- Deletes a sink. If the sink has a unique writer_identity, then that
24+-- service account is also deleted.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.sinks.delete@.
27+module Network.Google.Resource.Logging.BillingAccounts.Sinks.Delete
28+ (
29+ -- * REST Resource
30+ BillingAccountsSinksDeleteResource
31+
32+ -- * Creating a Request
33+ , billingAccountsSinksDelete
34+ , BillingAccountsSinksDelete
35+
36+ -- * Request Lenses
37+ , basdXgafv
38+ , basdUploadProtocol
39+ , basdPp
40+ , basdAccessToken
41+ , basdUploadType
42+ , basdBearerToken
43+ , basdSinkName
44+ , basdCallback
45+ ) where
46+
47+import Network.Google.Logging.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @logging.billingAccounts.sinks.delete@ method which the
51+-- 'BillingAccountsSinksDelete' request conforms to.
52+type BillingAccountsSinksDeleteResource =
53+ "v2" :>
54+ Capture "sinkName" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
63+
64+-- | Deletes a sink. If the sink has a unique writer_identity, then that
65+-- service account is also deleted.
66+--
67+-- /See:/ 'billingAccountsSinksDelete' smart constructor.
68+data BillingAccountsSinksDelete = BillingAccountsSinksDelete'
69+ { _basdXgafv :: !(Maybe Xgafv)
70+ , _basdUploadProtocol :: !(Maybe Text)
71+ , _basdPp :: !Bool
72+ , _basdAccessToken :: !(Maybe Text)
73+ , _basdUploadType :: !(Maybe Text)
74+ , _basdBearerToken :: !(Maybe Text)
75+ , _basdSinkName :: !Text
76+ , _basdCallback :: !(Maybe Text)
77+ } deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'BillingAccountsSinksDelete' with the minimum fields required to make a request.
80+--
81+-- Use one of the following lenses to modify other fields as desired:
82+--
83+-- * 'basdXgafv'
84+--
85+-- * 'basdUploadProtocol'
86+--
87+-- * 'basdPp'
88+--
89+-- * 'basdAccessToken'
90+--
91+-- * 'basdUploadType'
92+--
93+-- * 'basdBearerToken'
94+--
95+-- * 'basdSinkName'
96+--
97+-- * 'basdCallback'
98+billingAccountsSinksDelete
99+ :: Text -- ^ 'basdSinkName'
100+ -> BillingAccountsSinksDelete
101+billingAccountsSinksDelete pBasdSinkName_ =
102+ BillingAccountsSinksDelete'
103+ { _basdXgafv = Nothing
104+ , _basdUploadProtocol = Nothing
105+ , _basdPp = True
106+ , _basdAccessToken = Nothing
107+ , _basdUploadType = Nothing
108+ , _basdBearerToken = Nothing
109+ , _basdSinkName = pBasdSinkName_
110+ , _basdCallback = Nothing
111+ }
112+
113+-- | V1 error format.
114+basdXgafv :: Lens' BillingAccountsSinksDelete (Maybe Xgafv)
115+basdXgafv
116+ = lens _basdXgafv (\ s a -> s{_basdXgafv = a})
117+
118+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
119+basdUploadProtocol :: Lens' BillingAccountsSinksDelete (Maybe Text)
120+basdUploadProtocol
121+ = lens _basdUploadProtocol
122+ (\ s a -> s{_basdUploadProtocol = a})
123+
124+-- | Pretty-print response.
125+basdPp :: Lens' BillingAccountsSinksDelete Bool
126+basdPp = lens _basdPp (\ s a -> s{_basdPp = a})
127+
128+-- | OAuth access token.
129+basdAccessToken :: Lens' BillingAccountsSinksDelete (Maybe Text)
130+basdAccessToken
131+ = lens _basdAccessToken
132+ (\ s a -> s{_basdAccessToken = a})
133+
134+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
135+basdUploadType :: Lens' BillingAccountsSinksDelete (Maybe Text)
136+basdUploadType
137+ = lens _basdUploadType
138+ (\ s a -> s{_basdUploadType = a})
139+
140+-- | OAuth bearer token.
141+basdBearerToken :: Lens' BillingAccountsSinksDelete (Maybe Text)
142+basdBearerToken
143+ = lens _basdBearerToken
144+ (\ s a -> s{_basdBearerToken = a})
145+
146+-- | Required. The full resource name of the sink to delete, including the
147+-- parent resource and the sink identifier:
148+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
149+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" It is an error if
150+-- the sink does not exist. Example:
151+-- \"projects\/my-project-id\/sinks\/my-sink-id\". It is an error if the
152+-- sink does not exist.
153+basdSinkName :: Lens' BillingAccountsSinksDelete Text
154+basdSinkName
155+ = lens _basdSinkName (\ s a -> s{_basdSinkName = a})
156+
157+-- | JSONP
158+basdCallback :: Lens' BillingAccountsSinksDelete (Maybe Text)
159+basdCallback
160+ = lens _basdCallback (\ s a -> s{_basdCallback = a})
161+
162+instance GoogleRequest BillingAccountsSinksDelete
163+ where
164+ type Rs BillingAccountsSinksDelete = Empty
165+ type Scopes BillingAccountsSinksDelete =
166+ '["https://www.googleapis.com/auth/cloud-platform",
167+ "https://www.googleapis.com/auth/logging.admin"]
168+ requestClient BillingAccountsSinksDelete'{..}
169+ = go _basdSinkName _basdXgafv _basdUploadProtocol
170+ (Just _basdPp)
171+ _basdAccessToken
172+ _basdUploadType
173+ _basdBearerToken
174+ _basdCallback
175+ (Just AltJSON)
176+ loggingService
177+ where go
178+ = buildClient
179+ (Proxy :: Proxy BillingAccountsSinksDeleteResource)
180+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Get.hsnew file+176
@@ -0,0 +1,176 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.BillingAccounts.Sinks.Get
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)
22+--
23+-- Gets a sink.
24+--
25+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.sinks.get@.
26+module Network.Google.Resource.Logging.BillingAccounts.Sinks.Get
27+ (
28+ -- * REST Resource
29+ BillingAccountsSinksGetResource
30+
31+ -- * Creating a Request
32+ , billingAccountsSinksGet
33+ , BillingAccountsSinksGet
34+
35+ -- * Request Lenses
36+ , basgXgafv
37+ , basgUploadProtocol
38+ , basgPp
39+ , basgAccessToken
40+ , basgUploadType
41+ , basgBearerToken
42+ , basgSinkName
43+ , basgCallback
44+ ) where
45+
46+import Network.Google.Logging.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @logging.billingAccounts.sinks.get@ method which the
50+-- 'BillingAccountsSinksGet' request conforms to.
51+type BillingAccountsSinksGetResource =
52+ "v2" :>
53+ Capture "sinkName" Text :>
54+ QueryParam "$.xgafv" Xgafv :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :> Get '[JSON] LogSink
62+
63+-- | Gets a sink.
64+--
65+-- /See:/ 'billingAccountsSinksGet' smart constructor.
66+data BillingAccountsSinksGet = BillingAccountsSinksGet'
67+ { _basgXgafv :: !(Maybe Xgafv)
68+ , _basgUploadProtocol :: !(Maybe Text)
69+ , _basgPp :: !Bool
70+ , _basgAccessToken :: !(Maybe Text)
71+ , _basgUploadType :: !(Maybe Text)
72+ , _basgBearerToken :: !(Maybe Text)
73+ , _basgSinkName :: !Text
74+ , _basgCallback :: !(Maybe Text)
75+ } deriving (Eq,Show,Data,Typeable,Generic)
76+
77+-- | Creates a value of 'BillingAccountsSinksGet' with the minimum fields required to make a request.
78+--
79+-- Use one of the following lenses to modify other fields as desired:
80+--
81+-- * 'basgXgafv'
82+--
83+-- * 'basgUploadProtocol'
84+--
85+-- * 'basgPp'
86+--
87+-- * 'basgAccessToken'
88+--
89+-- * 'basgUploadType'
90+--
91+-- * 'basgBearerToken'
92+--
93+-- * 'basgSinkName'
94+--
95+-- * 'basgCallback'
96+billingAccountsSinksGet
97+ :: Text -- ^ 'basgSinkName'
98+ -> BillingAccountsSinksGet
99+billingAccountsSinksGet pBasgSinkName_ =
100+ BillingAccountsSinksGet'
101+ { _basgXgafv = Nothing
102+ , _basgUploadProtocol = Nothing
103+ , _basgPp = True
104+ , _basgAccessToken = Nothing
105+ , _basgUploadType = Nothing
106+ , _basgBearerToken = Nothing
107+ , _basgSinkName = pBasgSinkName_
108+ , _basgCallback = Nothing
109+ }
110+
111+-- | V1 error format.
112+basgXgafv :: Lens' BillingAccountsSinksGet (Maybe Xgafv)
113+basgXgafv
114+ = lens _basgXgafv (\ s a -> s{_basgXgafv = a})
115+
116+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
117+basgUploadProtocol :: Lens' BillingAccountsSinksGet (Maybe Text)
118+basgUploadProtocol
119+ = lens _basgUploadProtocol
120+ (\ s a -> s{_basgUploadProtocol = a})
121+
122+-- | Pretty-print response.
123+basgPp :: Lens' BillingAccountsSinksGet Bool
124+basgPp = lens _basgPp (\ s a -> s{_basgPp = a})
125+
126+-- | OAuth access token.
127+basgAccessToken :: Lens' BillingAccountsSinksGet (Maybe Text)
128+basgAccessToken
129+ = lens _basgAccessToken
130+ (\ s a -> s{_basgAccessToken = a})
131+
132+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
133+basgUploadType :: Lens' BillingAccountsSinksGet (Maybe Text)
134+basgUploadType
135+ = lens _basgUploadType
136+ (\ s a -> s{_basgUploadType = a})
137+
138+-- | OAuth bearer token.
139+basgBearerToken :: Lens' BillingAccountsSinksGet (Maybe Text)
140+basgBearerToken
141+ = lens _basgBearerToken
142+ (\ s a -> s{_basgBearerToken = a})
143+
144+-- | Required. The parent resource name of the sink:
145+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
146+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
147+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
148+basgSinkName :: Lens' BillingAccountsSinksGet Text
149+basgSinkName
150+ = lens _basgSinkName (\ s a -> s{_basgSinkName = a})
151+
152+-- | JSONP
153+basgCallback :: Lens' BillingAccountsSinksGet (Maybe Text)
154+basgCallback
155+ = lens _basgCallback (\ s a -> s{_basgCallback = a})
156+
157+instance GoogleRequest BillingAccountsSinksGet where
158+ type Rs BillingAccountsSinksGet = LogSink
159+ type Scopes BillingAccountsSinksGet =
160+ '["https://www.googleapis.com/auth/cloud-platform",
161+ "https://www.googleapis.com/auth/cloud-platform.read-only",
162+ "https://www.googleapis.com/auth/logging.admin",
163+ "https://www.googleapis.com/auth/logging.read"]
164+ requestClient BillingAccountsSinksGet'{..}
165+ = go _basgSinkName _basgXgafv _basgUploadProtocol
166+ (Just _basgPp)
167+ _basgAccessToken
168+ _basgUploadType
169+ _basgBearerToken
170+ _basgCallback
171+ (Just AltJSON)
172+ loggingService
173+ where go
174+ = buildClient
175+ (Proxy :: Proxy BillingAccountsSinksGetResource)
176+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/List.hsnew file+207
@@ -0,0 +1,207 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.BillingAccounts.Sinks.List
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)
22+--
23+-- Lists sinks.
24+--
25+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.sinks.list@.
26+module Network.Google.Resource.Logging.BillingAccounts.Sinks.List
27+ (
28+ -- * REST Resource
29+ BillingAccountsSinksListResource
30+
31+ -- * Creating a Request
32+ , billingAccountsSinksList
33+ , BillingAccountsSinksList
34+
35+ -- * Request Lenses
36+ , baslParent
37+ , baslXgafv
38+ , baslUploadProtocol
39+ , baslPp
40+ , baslAccessToken
41+ , baslUploadType
42+ , baslBearerToken
43+ , baslPageToken
44+ , baslPageSize
45+ , baslCallback
46+ ) where
47+
48+import Network.Google.Logging.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @logging.billingAccounts.sinks.list@ method which the
52+-- 'BillingAccountsSinksList' request conforms to.
53+type BillingAccountsSinksListResource =
54+ "v2" :>
55+ Capture "parent" Text :>
56+ "sinks" :>
57+ QueryParam "$.xgafv" Xgafv :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "pageToken" Text :>
64+ QueryParam "pageSize" (Textual Int32) :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ Get '[JSON] ListSinksResponse
68+
69+-- | Lists sinks.
70+--
71+-- /See:/ 'billingAccountsSinksList' smart constructor.
72+data BillingAccountsSinksList = BillingAccountsSinksList'
73+ { _baslParent :: !Text
74+ , _baslXgafv :: !(Maybe Xgafv)
75+ , _baslUploadProtocol :: !(Maybe Text)
76+ , _baslPp :: !Bool
77+ , _baslAccessToken :: !(Maybe Text)
78+ , _baslUploadType :: !(Maybe Text)
79+ , _baslBearerToken :: !(Maybe Text)
80+ , _baslPageToken :: !(Maybe Text)
81+ , _baslPageSize :: !(Maybe (Textual Int32))
82+ , _baslCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'BillingAccountsSinksList' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'baslParent'
90+--
91+-- * 'baslXgafv'
92+--
93+-- * 'baslUploadProtocol'
94+--
95+-- * 'baslPp'
96+--
97+-- * 'baslAccessToken'
98+--
99+-- * 'baslUploadType'
100+--
101+-- * 'baslBearerToken'
102+--
103+-- * 'baslPageToken'
104+--
105+-- * 'baslPageSize'
106+--
107+-- * 'baslCallback'
108+billingAccountsSinksList
109+ :: Text -- ^ 'baslParent'
110+ -> BillingAccountsSinksList
111+billingAccountsSinksList pBaslParent_ =
112+ BillingAccountsSinksList'
113+ { _baslParent = pBaslParent_
114+ , _baslXgafv = Nothing
115+ , _baslUploadProtocol = Nothing
116+ , _baslPp = True
117+ , _baslAccessToken = Nothing
118+ , _baslUploadType = Nothing
119+ , _baslBearerToken = Nothing
120+ , _baslPageToken = Nothing
121+ , _baslPageSize = Nothing
122+ , _baslCallback = Nothing
123+ }
124+
125+-- | Required. The parent resource whose sinks are to be listed. Examples:
126+-- \"projects\/my-logging-project\", \"organizations\/123456789\".
127+baslParent :: Lens' BillingAccountsSinksList Text
128+baslParent
129+ = lens _baslParent (\ s a -> s{_baslParent = a})
130+
131+-- | V1 error format.
132+baslXgafv :: Lens' BillingAccountsSinksList (Maybe Xgafv)
133+baslXgafv
134+ = lens _baslXgafv (\ s a -> s{_baslXgafv = a})
135+
136+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
137+baslUploadProtocol :: Lens' BillingAccountsSinksList (Maybe Text)
138+baslUploadProtocol
139+ = lens _baslUploadProtocol
140+ (\ s a -> s{_baslUploadProtocol = a})
141+
142+-- | Pretty-print response.
143+baslPp :: Lens' BillingAccountsSinksList Bool
144+baslPp = lens _baslPp (\ s a -> s{_baslPp = a})
145+
146+-- | OAuth access token.
147+baslAccessToken :: Lens' BillingAccountsSinksList (Maybe Text)
148+baslAccessToken
149+ = lens _baslAccessToken
150+ (\ s a -> s{_baslAccessToken = a})
151+
152+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
153+baslUploadType :: Lens' BillingAccountsSinksList (Maybe Text)
154+baslUploadType
155+ = lens _baslUploadType
156+ (\ s a -> s{_baslUploadType = a})
157+
158+-- | OAuth bearer token.
159+baslBearerToken :: Lens' BillingAccountsSinksList (Maybe Text)
160+baslBearerToken
161+ = lens _baslBearerToken
162+ (\ s a -> s{_baslBearerToken = a})
163+
164+-- | Optional. If present, then retrieve the next batch of results from the
165+-- preceding call to this method. pageToken must be the value of
166+-- nextPageToken from the previous response. The values of other method
167+-- parameters should be identical to those in the previous call.
168+baslPageToken :: Lens' BillingAccountsSinksList (Maybe Text)
169+baslPageToken
170+ = lens _baslPageToken
171+ (\ s a -> s{_baslPageToken = a})
172+
173+-- | Optional. The maximum number of results to return from this request.
174+-- Non-positive values are ignored. The presence of nextPageToken in the
175+-- response indicates that more results might be available.
176+baslPageSize :: Lens' BillingAccountsSinksList (Maybe Int32)
177+baslPageSize
178+ = lens _baslPageSize (\ s a -> s{_baslPageSize = a})
179+ . mapping _Coerce
180+
181+-- | JSONP
182+baslCallback :: Lens' BillingAccountsSinksList (Maybe Text)
183+baslCallback
184+ = lens _baslCallback (\ s a -> s{_baslCallback = a})
185+
186+instance GoogleRequest BillingAccountsSinksList where
187+ type Rs BillingAccountsSinksList = ListSinksResponse
188+ type Scopes BillingAccountsSinksList =
189+ '["https://www.googleapis.com/auth/cloud-platform",
190+ "https://www.googleapis.com/auth/cloud-platform.read-only",
191+ "https://www.googleapis.com/auth/logging.admin",
192+ "https://www.googleapis.com/auth/logging.read"]
193+ requestClient BillingAccountsSinksList'{..}
194+ = go _baslParent _baslXgafv _baslUploadProtocol
195+ (Just _baslPp)
196+ _baslAccessToken
197+ _baslUploadType
198+ _baslBearerToken
199+ _baslPageToken
200+ _baslPageSize
201+ _baslCallback
202+ (Just AltJSON)
203+ loggingService
204+ where go
205+ = buildClient
206+ (Proxy :: Proxy BillingAccountsSinksListResource)
207+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/BillingAccounts/Sinks/Update.hsnew file+220
@@ -0,0 +1,220 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.BillingAccounts.Sinks.Update
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)
22+--
23+-- Updates a sink. If the named sink doesn\'t exist, then this method is
24+-- identical to sinks.create. If the named sink does exist, then this
25+-- method replaces the following fields in the existing sink with values
26+-- from the new sink: destination, filter, output_version_format,
27+-- start_time, and end_time. The updated filter might also have a new
28+-- writer_identity; see the unique_writer_identity field.
29+--
30+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.billingAccounts.sinks.update@.
31+module Network.Google.Resource.Logging.BillingAccounts.Sinks.Update
32+ (
33+ -- * REST Resource
34+ BillingAccountsSinksUpdateResource
35+
36+ -- * Creating a Request
37+ , billingAccountsSinksUpdate
38+ , BillingAccountsSinksUpdate
39+
40+ -- * Request Lenses
41+ , basuXgafv
42+ , basuUniqueWriterIdentity
43+ , basuUploadProtocol
44+ , basuPp
45+ , basuAccessToken
46+ , basuUploadType
47+ , basuPayload
48+ , basuBearerToken
49+ , basuSinkName
50+ , basuCallback
51+ ) where
52+
53+import Network.Google.Logging.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @logging.billingAccounts.sinks.update@ method which the
57+-- 'BillingAccountsSinksUpdate' request conforms to.
58+type BillingAccountsSinksUpdateResource =
59+ "v2" :>
60+ Capture "sinkName" Text :>
61+ QueryParam "$.xgafv" Xgafv :>
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
71+
72+-- | Updates a sink. If the named sink doesn\'t exist, then this method is
73+-- identical to sinks.create. If the named sink does exist, then this
74+-- method replaces the following fields in the existing sink with values
75+-- from the new sink: destination, filter, output_version_format,
76+-- start_time, and end_time. The updated filter might also have a new
77+-- writer_identity; see the unique_writer_identity field.
78+--
79+-- /See:/ 'billingAccountsSinksUpdate' smart constructor.
80+data BillingAccountsSinksUpdate = BillingAccountsSinksUpdate'
81+ { _basuXgafv :: !(Maybe Xgafv)
82+ , _basuUniqueWriterIdentity :: !(Maybe Bool)
83+ , _basuUploadProtocol :: !(Maybe Text)
84+ , _basuPp :: !Bool
85+ , _basuAccessToken :: !(Maybe Text)
86+ , _basuUploadType :: !(Maybe Text)
87+ , _basuPayload :: !LogSink
88+ , _basuBearerToken :: !(Maybe Text)
89+ , _basuSinkName :: !Text
90+ , _basuCallback :: !(Maybe Text)
91+ } deriving (Eq,Show,Data,Typeable,Generic)
92+
93+-- | Creates a value of 'BillingAccountsSinksUpdate' with the minimum fields required to make a request.
94+--
95+-- Use one of the following lenses to modify other fields as desired:
96+--
97+-- * 'basuXgafv'
98+--
99+-- * 'basuUniqueWriterIdentity'
100+--
101+-- * 'basuUploadProtocol'
102+--
103+-- * 'basuPp'
104+--
105+-- * 'basuAccessToken'
106+--
107+-- * 'basuUploadType'
108+--
109+-- * 'basuPayload'
110+--
111+-- * 'basuBearerToken'
112+--
113+-- * 'basuSinkName'
114+--
115+-- * 'basuCallback'
116+billingAccountsSinksUpdate
117+ :: LogSink -- ^ 'basuPayload'
118+ -> Text -- ^ 'basuSinkName'
119+ -> BillingAccountsSinksUpdate
120+billingAccountsSinksUpdate pBasuPayload_ pBasuSinkName_ =
121+ BillingAccountsSinksUpdate'
122+ { _basuXgafv = Nothing
123+ , _basuUniqueWriterIdentity = Nothing
124+ , _basuUploadProtocol = Nothing
125+ , _basuPp = True
126+ , _basuAccessToken = Nothing
127+ , _basuUploadType = Nothing
128+ , _basuPayload = pBasuPayload_
129+ , _basuBearerToken = Nothing
130+ , _basuSinkName = pBasuSinkName_
131+ , _basuCallback = Nothing
132+ }
133+
134+-- | V1 error format.
135+basuXgafv :: Lens' BillingAccountsSinksUpdate (Maybe Xgafv)
136+basuXgafv
137+ = lens _basuXgafv (\ s a -> s{_basuXgafv = a})
138+
139+-- | Optional. See sinks.create for a description of this field. When
140+-- updating a sink, the effect of this field on the value of
141+-- writer_identity in the updated sink depends on both the old and new
142+-- values of this field: If the old and new values of this field are both
143+-- false or both true, then there is no change to the sink\'s
144+-- writer_identity. If the old value was false and the new value is true,
145+-- then writer_identity is changed to a unique service account. It is an
146+-- error if the old value was true and the new value is false.
147+basuUniqueWriterIdentity :: Lens' BillingAccountsSinksUpdate (Maybe Bool)
148+basuUniqueWriterIdentity
149+ = lens _basuUniqueWriterIdentity
150+ (\ s a -> s{_basuUniqueWriterIdentity = a})
151+
152+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
153+basuUploadProtocol :: Lens' BillingAccountsSinksUpdate (Maybe Text)
154+basuUploadProtocol
155+ = lens _basuUploadProtocol
156+ (\ s a -> s{_basuUploadProtocol = a})
157+
158+-- | Pretty-print response.
159+basuPp :: Lens' BillingAccountsSinksUpdate Bool
160+basuPp = lens _basuPp (\ s a -> s{_basuPp = a})
161+
162+-- | OAuth access token.
163+basuAccessToken :: Lens' BillingAccountsSinksUpdate (Maybe Text)
164+basuAccessToken
165+ = lens _basuAccessToken
166+ (\ s a -> s{_basuAccessToken = a})
167+
168+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
169+basuUploadType :: Lens' BillingAccountsSinksUpdate (Maybe Text)
170+basuUploadType
171+ = lens _basuUploadType
172+ (\ s a -> s{_basuUploadType = a})
173+
174+-- | Multipart request metadata.
175+basuPayload :: Lens' BillingAccountsSinksUpdate LogSink
176+basuPayload
177+ = lens _basuPayload (\ s a -> s{_basuPayload = a})
178+
179+-- | OAuth bearer token.
180+basuBearerToken :: Lens' BillingAccountsSinksUpdate (Maybe Text)
181+basuBearerToken
182+ = lens _basuBearerToken
183+ (\ s a -> s{_basuBearerToken = a})
184+
185+-- | Required. The full resource name of the sink to update, including the
186+-- parent resource and the sink identifier:
187+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
188+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
189+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
190+basuSinkName :: Lens' BillingAccountsSinksUpdate Text
191+basuSinkName
192+ = lens _basuSinkName (\ s a -> s{_basuSinkName = a})
193+
194+-- | JSONP
195+basuCallback :: Lens' BillingAccountsSinksUpdate (Maybe Text)
196+basuCallback
197+ = lens _basuCallback (\ s a -> s{_basuCallback = a})
198+
199+instance GoogleRequest BillingAccountsSinksUpdate
200+ where
201+ type Rs BillingAccountsSinksUpdate = LogSink
202+ type Scopes BillingAccountsSinksUpdate =
203+ '["https://www.googleapis.com/auth/cloud-platform",
204+ "https://www.googleapis.com/auth/logging.admin"]
205+ requestClient BillingAccountsSinksUpdate'{..}
206+ = go _basuSinkName _basuXgafv
207+ _basuUniqueWriterIdentity
208+ _basuUploadProtocol
209+ (Just _basuPp)
210+ _basuAccessToken
211+ _basuUploadType
212+ _basuBearerToken
213+ _basuCallback
214+ (Just AltJSON)
215+ _basuPayload
216+ loggingService
217+ where go
218+ = buildClient
219+ (Proxy :: Proxy BillingAccountsSinksUpdateResource)
220+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Entries/List.hs+4−6
@@ -20,9 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Lists log entries. Use this method to retrieve log entries from Cloud
24−-- Logging. For ways to export log entries, see [Exporting
25−-- Logs](\/logging\/docs\/export).
23+-- Lists log entries. Use this method to retrieve log entries from
24+-- Stackdriver Logging. For ways to export log entries, see Exporting Logs.
2625--
2726-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.entries.list@.
2827module Network.Google.Resource.Logging.Entries.List
@@ -64,9 +63,8 @@ type EntriesListResource =
6463 ReqBody '[JSON] ListLogEntriesRequest :>
6564 Post '[JSON] ListLogEntriesResponse
6665
67−-- | Lists log entries. Use this method to retrieve log entries from Cloud
68−-- Logging. For ways to export log entries, see [Exporting
69−-- Logs](\/logging\/docs\/export).
66+-- | Lists log entries. Use this method to retrieve log entries from
67+-- Stackdriver Logging. For ways to export log entries, see Exporting Logs.
7068--
7169-- /See:/ 'entriesList' smart constructor.
7270data EntriesList = EntriesList'
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/Delete.hsnew file+177
@@ -0,0 +1,177 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Logs.Delete
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)
22+--
23+-- Deletes all the log entries in a log. The log reappears if it receives
24+-- new entries.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.logs.delete@.
27+module Network.Google.Resource.Logging.Folders.Logs.Delete
28+ (
29+ -- * REST Resource
30+ FoldersLogsDeleteResource
31+
32+ -- * Creating a Request
33+ , foldersLogsDelete
34+ , FoldersLogsDelete
35+
36+ -- * Request Lenses
37+ , fldXgafv
38+ , fldUploadProtocol
39+ , fldPp
40+ , fldAccessToken
41+ , fldUploadType
42+ , fldBearerToken
43+ , fldLogName
44+ , fldCallback
45+ ) where
46+
47+import Network.Google.Logging.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @logging.folders.logs.delete@ method which the
51+-- 'FoldersLogsDelete' request conforms to.
52+type FoldersLogsDeleteResource =
53+ "v2" :>
54+ Capture "logName" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
63+
64+-- | Deletes all the log entries in a log. The log reappears if it receives
65+-- new entries.
66+--
67+-- /See:/ 'foldersLogsDelete' smart constructor.
68+data FoldersLogsDelete = FoldersLogsDelete'
69+ { _fldXgafv :: !(Maybe Xgafv)
70+ , _fldUploadProtocol :: !(Maybe Text)
71+ , _fldPp :: !Bool
72+ , _fldAccessToken :: !(Maybe Text)
73+ , _fldUploadType :: !(Maybe Text)
74+ , _fldBearerToken :: !(Maybe Text)
75+ , _fldLogName :: !Text
76+ , _fldCallback :: !(Maybe Text)
77+ } deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'FoldersLogsDelete' with the minimum fields required to make a request.
80+--
81+-- Use one of the following lenses to modify other fields as desired:
82+--
83+-- * 'fldXgafv'
84+--
85+-- * 'fldUploadProtocol'
86+--
87+-- * 'fldPp'
88+--
89+-- * 'fldAccessToken'
90+--
91+-- * 'fldUploadType'
92+--
93+-- * 'fldBearerToken'
94+--
95+-- * 'fldLogName'
96+--
97+-- * 'fldCallback'
98+foldersLogsDelete
99+ :: Text -- ^ 'fldLogName'
100+ -> FoldersLogsDelete
101+foldersLogsDelete pFldLogName_ =
102+ FoldersLogsDelete'
103+ { _fldXgafv = Nothing
104+ , _fldUploadProtocol = Nothing
105+ , _fldPp = True
106+ , _fldAccessToken = Nothing
107+ , _fldUploadType = Nothing
108+ , _fldBearerToken = Nothing
109+ , _fldLogName = pFldLogName_
110+ , _fldCallback = Nothing
111+ }
112+
113+-- | V1 error format.
114+fldXgafv :: Lens' FoldersLogsDelete (Maybe Xgafv)
115+fldXgafv = lens _fldXgafv (\ s a -> s{_fldXgafv = a})
116+
117+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
118+fldUploadProtocol :: Lens' FoldersLogsDelete (Maybe Text)
119+fldUploadProtocol
120+ = lens _fldUploadProtocol
121+ (\ s a -> s{_fldUploadProtocol = a})
122+
123+-- | Pretty-print response.
124+fldPp :: Lens' FoldersLogsDelete Bool
125+fldPp = lens _fldPp (\ s a -> s{_fldPp = a})
126+
127+-- | OAuth access token.
128+fldAccessToken :: Lens' FoldersLogsDelete (Maybe Text)
129+fldAccessToken
130+ = lens _fldAccessToken
131+ (\ s a -> s{_fldAccessToken = a})
132+
133+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
134+fldUploadType :: Lens' FoldersLogsDelete (Maybe Text)
135+fldUploadType
136+ = lens _fldUploadType
137+ (\ s a -> s{_fldUploadType = a})
138+
139+-- | OAuth bearer token.
140+fldBearerToken :: Lens' FoldersLogsDelete (Maybe Text)
141+fldBearerToken
142+ = lens _fldBearerToken
143+ (\ s a -> s{_fldBearerToken = a})
144+
145+-- | Required. The resource name of the log to delete:
146+-- \"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\"
147+-- \"organizations\/[ORGANIZATION_ID]\/logs\/[LOG_ID]\" [LOG_ID] must be
148+-- URL-encoded. For example, \"projects\/my-project-id\/logs\/syslog\",
149+-- \"organizations\/1234567890\/logs\/cloudresourcemanager.googleapis.com%2Factivity\".
150+-- For more information about log names, see LogEntry.
151+fldLogName :: Lens' FoldersLogsDelete Text
152+fldLogName
153+ = lens _fldLogName (\ s a -> s{_fldLogName = a})
154+
155+-- | JSONP
156+fldCallback :: Lens' FoldersLogsDelete (Maybe Text)
157+fldCallback
158+ = lens _fldCallback (\ s a -> s{_fldCallback = a})
159+
160+instance GoogleRequest FoldersLogsDelete where
161+ type Rs FoldersLogsDelete = Empty
162+ type Scopes FoldersLogsDelete =
163+ '["https://www.googleapis.com/auth/cloud-platform",
164+ "https://www.googleapis.com/auth/logging.admin"]
165+ requestClient FoldersLogsDelete'{..}
166+ = go _fldLogName _fldXgafv _fldUploadProtocol
167+ (Just _fldPp)
168+ _fldAccessToken
169+ _fldUploadType
170+ _fldBearerToken
171+ _fldCallback
172+ (Just AltJSON)
173+ loggingService
174+ where go
175+ = buildClient
176+ (Proxy :: Proxy FoldersLogsDeleteResource)
177+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Logs/List.hsnew file+207
@@ -0,0 +1,207 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Logs.List
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)
22+--
23+-- Lists the logs in projects or organizations. Only logs that have entries
24+-- are listed.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.logs.list@.
27+module Network.Google.Resource.Logging.Folders.Logs.List
28+ (
29+ -- * REST Resource
30+ FoldersLogsListResource
31+
32+ -- * Creating a Request
33+ , foldersLogsList
34+ , FoldersLogsList
35+
36+ -- * Request Lenses
37+ , fllParent
38+ , fllXgafv
39+ , fllUploadProtocol
40+ , fllPp
41+ , fllAccessToken
42+ , fllUploadType
43+ , fllBearerToken
44+ , fllPageToken
45+ , fllPageSize
46+ , fllCallback
47+ ) where
48+
49+import Network.Google.Logging.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @logging.folders.logs.list@ method which the
53+-- 'FoldersLogsList' request conforms to.
54+type FoldersLogsListResource =
55+ "v2" :>
56+ Capture "parent" Text :>
57+ "logs" :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "pageToken" Text :>
65+ QueryParam "pageSize" (Textual Int32) :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ Get '[JSON] ListLogsResponse
69+
70+-- | Lists the logs in projects or organizations. Only logs that have entries
71+-- are listed.
72+--
73+-- /See:/ 'foldersLogsList' smart constructor.
74+data FoldersLogsList = FoldersLogsList'
75+ { _fllParent :: !Text
76+ , _fllXgafv :: !(Maybe Xgafv)
77+ , _fllUploadProtocol :: !(Maybe Text)
78+ , _fllPp :: !Bool
79+ , _fllAccessToken :: !(Maybe Text)
80+ , _fllUploadType :: !(Maybe Text)
81+ , _fllBearerToken :: !(Maybe Text)
82+ , _fllPageToken :: !(Maybe Text)
83+ , _fllPageSize :: !(Maybe (Textual Int32))
84+ , _fllCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'FoldersLogsList' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'fllParent'
92+--
93+-- * 'fllXgafv'
94+--
95+-- * 'fllUploadProtocol'
96+--
97+-- * 'fllPp'
98+--
99+-- * 'fllAccessToken'
100+--
101+-- * 'fllUploadType'
102+--
103+-- * 'fllBearerToken'
104+--
105+-- * 'fllPageToken'
106+--
107+-- * 'fllPageSize'
108+--
109+-- * 'fllCallback'
110+foldersLogsList
111+ :: Text -- ^ 'fllParent'
112+ -> FoldersLogsList
113+foldersLogsList pFllParent_ =
114+ FoldersLogsList'
115+ { _fllParent = pFllParent_
116+ , _fllXgafv = Nothing
117+ , _fllUploadProtocol = Nothing
118+ , _fllPp = True
119+ , _fllAccessToken = Nothing
120+ , _fllUploadType = Nothing
121+ , _fllBearerToken = Nothing
122+ , _fllPageToken = Nothing
123+ , _fllPageSize = Nothing
124+ , _fllCallback = Nothing
125+ }
126+
127+-- | Required. The resource name that owns the logs:
128+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
129+fllParent :: Lens' FoldersLogsList Text
130+fllParent
131+ = lens _fllParent (\ s a -> s{_fllParent = a})
132+
133+-- | V1 error format.
134+fllXgafv :: Lens' FoldersLogsList (Maybe Xgafv)
135+fllXgafv = lens _fllXgafv (\ s a -> s{_fllXgafv = a})
136+
137+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
138+fllUploadProtocol :: Lens' FoldersLogsList (Maybe Text)
139+fllUploadProtocol
140+ = lens _fllUploadProtocol
141+ (\ s a -> s{_fllUploadProtocol = a})
142+
143+-- | Pretty-print response.
144+fllPp :: Lens' FoldersLogsList Bool
145+fllPp = lens _fllPp (\ s a -> s{_fllPp = a})
146+
147+-- | OAuth access token.
148+fllAccessToken :: Lens' FoldersLogsList (Maybe Text)
149+fllAccessToken
150+ = lens _fllAccessToken
151+ (\ s a -> s{_fllAccessToken = a})
152+
153+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
154+fllUploadType :: Lens' FoldersLogsList (Maybe Text)
155+fllUploadType
156+ = lens _fllUploadType
157+ (\ s a -> s{_fllUploadType = a})
158+
159+-- | OAuth bearer token.
160+fllBearerToken :: Lens' FoldersLogsList (Maybe Text)
161+fllBearerToken
162+ = lens _fllBearerToken
163+ (\ s a -> s{_fllBearerToken = a})
164+
165+-- | Optional. If present, then retrieve the next batch of results from the
166+-- preceding call to this method. pageToken must be the value of
167+-- nextPageToken from the previous response. The values of other method
168+-- parameters should be identical to those in the previous call.
169+fllPageToken :: Lens' FoldersLogsList (Maybe Text)
170+fllPageToken
171+ = lens _fllPageToken (\ s a -> s{_fllPageToken = a})
172+
173+-- | Optional. The maximum number of results to return from this request.
174+-- Non-positive values are ignored. The presence of nextPageToken in the
175+-- response indicates that more results might be available.
176+fllPageSize :: Lens' FoldersLogsList (Maybe Int32)
177+fllPageSize
178+ = lens _fllPageSize (\ s a -> s{_fllPageSize = a}) .
179+ mapping _Coerce
180+
181+-- | JSONP
182+fllCallback :: Lens' FoldersLogsList (Maybe Text)
183+fllCallback
184+ = lens _fllCallback (\ s a -> s{_fllCallback = a})
185+
186+instance GoogleRequest FoldersLogsList where
187+ type Rs FoldersLogsList = ListLogsResponse
188+ type Scopes FoldersLogsList =
189+ '["https://www.googleapis.com/auth/cloud-platform",
190+ "https://www.googleapis.com/auth/cloud-platform.read-only",
191+ "https://www.googleapis.com/auth/logging.admin",
192+ "https://www.googleapis.com/auth/logging.read"]
193+ requestClient FoldersLogsList'{..}
194+ = go _fllParent _fllXgafv _fllUploadProtocol
195+ (Just _fllPp)
196+ _fllAccessToken
197+ _fllUploadType
198+ _fllBearerToken
199+ _fllPageToken
200+ _fllPageSize
201+ _fllCallback
202+ (Just AltJSON)
203+ loggingService
204+ where go
205+ = buildClient
206+ (Proxy :: Proxy FoldersLogsListResource)
207+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Create.hsnew file+217
@@ -0,0 +1,217 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Sinks.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)
22+--
23+-- Creates a sink that exports specified log entries to a destination. The
24+-- export of newly-ingested log entries begins immediately, unless the
25+-- current time is outside the sink\'s start and end times or the sink\'s
26+-- writer_identity is not permitted to write to the destination. A sink can
27+-- export log entries only from the resource owning the sink.
28+--
29+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.sinks.create@.
30+module Network.Google.Resource.Logging.Folders.Sinks.Create
31+ (
32+ -- * REST Resource
33+ FoldersSinksCreateResource
34+
35+ -- * Creating a Request
36+ , foldersSinksCreate
37+ , FoldersSinksCreate
38+
39+ -- * Request Lenses
40+ , fscParent
41+ , fscXgafv
42+ , fscUniqueWriterIdentity
43+ , fscUploadProtocol
44+ , fscPp
45+ , fscAccessToken
46+ , fscUploadType
47+ , fscPayload
48+ , fscBearerToken
49+ , fscCallback
50+ ) where
51+
52+import Network.Google.Logging.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @logging.folders.sinks.create@ method which the
56+-- 'FoldersSinksCreate' request conforms to.
57+type FoldersSinksCreateResource =
58+ "v2" :>
59+ Capture "parent" Text :>
60+ "sinks" :>
61+ QueryParam "$.xgafv" Xgafv :>
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Post '[JSON] LogSink
71+
72+-- | Creates a sink that exports specified log entries to a destination. The
73+-- export of newly-ingested log entries begins immediately, unless the
74+-- current time is outside the sink\'s start and end times or the sink\'s
75+-- writer_identity is not permitted to write to the destination. A sink can
76+-- export log entries only from the resource owning the sink.
77+--
78+-- /See:/ 'foldersSinksCreate' smart constructor.
79+data FoldersSinksCreate = FoldersSinksCreate'
80+ { _fscParent :: !Text
81+ , _fscXgafv :: !(Maybe Xgafv)
82+ , _fscUniqueWriterIdentity :: !(Maybe Bool)
83+ , _fscUploadProtocol :: !(Maybe Text)
84+ , _fscPp :: !Bool
85+ , _fscAccessToken :: !(Maybe Text)
86+ , _fscUploadType :: !(Maybe Text)
87+ , _fscPayload :: !LogSink
88+ , _fscBearerToken :: !(Maybe Text)
89+ , _fscCallback :: !(Maybe Text)
90+ } deriving (Eq,Show,Data,Typeable,Generic)
91+
92+-- | Creates a value of 'FoldersSinksCreate' with the minimum fields required to make a request.
93+--
94+-- Use one of the following lenses to modify other fields as desired:
95+--
96+-- * 'fscParent'
97+--
98+-- * 'fscXgafv'
99+--
100+-- * 'fscUniqueWriterIdentity'
101+--
102+-- * 'fscUploadProtocol'
103+--
104+-- * 'fscPp'
105+--
106+-- * 'fscAccessToken'
107+--
108+-- * 'fscUploadType'
109+--
110+-- * 'fscPayload'
111+--
112+-- * 'fscBearerToken'
113+--
114+-- * 'fscCallback'
115+foldersSinksCreate
116+ :: Text -- ^ 'fscParent'
117+ -> LogSink -- ^ 'fscPayload'
118+ -> FoldersSinksCreate
119+foldersSinksCreate pFscParent_ pFscPayload_ =
120+ FoldersSinksCreate'
121+ { _fscParent = pFscParent_
122+ , _fscXgafv = Nothing
123+ , _fscUniqueWriterIdentity = Nothing
124+ , _fscUploadProtocol = Nothing
125+ , _fscPp = True
126+ , _fscAccessToken = Nothing
127+ , _fscUploadType = Nothing
128+ , _fscPayload = pFscPayload_
129+ , _fscBearerToken = Nothing
130+ , _fscCallback = Nothing
131+ }
132+
133+-- | Required. The resource in which to create the sink:
134+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
135+-- Examples: \"projects\/my-logging-project\",
136+-- \"organizations\/123456789\".
137+fscParent :: Lens' FoldersSinksCreate Text
138+fscParent
139+ = lens _fscParent (\ s a -> s{_fscParent = a})
140+
141+-- | V1 error format.
142+fscXgafv :: Lens' FoldersSinksCreate (Maybe Xgafv)
143+fscXgafv = lens _fscXgafv (\ s a -> s{_fscXgafv = a})
144+
145+-- | Optional. Determines the kind of IAM identity returned as
146+-- writer_identity in the new sink. If this value is omitted or set to
147+-- false, and if the sink\'s parent is a project, then the value returned
148+-- as writer_identity is cloud-logs\'google.com, the same identity used
149+-- before the addition of writer identities to this API. The sink\'s
150+-- destination must be in the same project as the sink itself.If this field
151+-- is set to true, or if the sink is owned by a non-project resource such
152+-- as an organization, then the value of writer_identity will be a unique
153+-- service account used only for exports from the new sink. For more
154+-- information, see writer_identity in LogSink.
155+fscUniqueWriterIdentity :: Lens' FoldersSinksCreate (Maybe Bool)
156+fscUniqueWriterIdentity
157+ = lens _fscUniqueWriterIdentity
158+ (\ s a -> s{_fscUniqueWriterIdentity = a})
159+
160+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
161+fscUploadProtocol :: Lens' FoldersSinksCreate (Maybe Text)
162+fscUploadProtocol
163+ = lens _fscUploadProtocol
164+ (\ s a -> s{_fscUploadProtocol = a})
165+
166+-- | Pretty-print response.
167+fscPp :: Lens' FoldersSinksCreate Bool
168+fscPp = lens _fscPp (\ s a -> s{_fscPp = a})
169+
170+-- | OAuth access token.
171+fscAccessToken :: Lens' FoldersSinksCreate (Maybe Text)
172+fscAccessToken
173+ = lens _fscAccessToken
174+ (\ s a -> s{_fscAccessToken = a})
175+
176+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
177+fscUploadType :: Lens' FoldersSinksCreate (Maybe Text)
178+fscUploadType
179+ = lens _fscUploadType
180+ (\ s a -> s{_fscUploadType = a})
181+
182+-- | Multipart request metadata.
183+fscPayload :: Lens' FoldersSinksCreate LogSink
184+fscPayload
185+ = lens _fscPayload (\ s a -> s{_fscPayload = a})
186+
187+-- | OAuth bearer token.
188+fscBearerToken :: Lens' FoldersSinksCreate (Maybe Text)
189+fscBearerToken
190+ = lens _fscBearerToken
191+ (\ s a -> s{_fscBearerToken = a})
192+
193+-- | JSONP
194+fscCallback :: Lens' FoldersSinksCreate (Maybe Text)
195+fscCallback
196+ = lens _fscCallback (\ s a -> s{_fscCallback = a})
197+
198+instance GoogleRequest FoldersSinksCreate where
199+ type Rs FoldersSinksCreate = LogSink
200+ type Scopes FoldersSinksCreate =
201+ '["https://www.googleapis.com/auth/cloud-platform",
202+ "https://www.googleapis.com/auth/logging.admin"]
203+ requestClient FoldersSinksCreate'{..}
204+ = go _fscParent _fscXgafv _fscUniqueWriterIdentity
205+ _fscUploadProtocol
206+ (Just _fscPp)
207+ _fscAccessToken
208+ _fscUploadType
209+ _fscBearerToken
210+ _fscCallback
211+ (Just AltJSON)
212+ _fscPayload
213+ loggingService
214+ where go
215+ = buildClient
216+ (Proxy :: Proxy FoldersSinksCreateResource)
217+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Delete.hsnew file+178
@@ -0,0 +1,178 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Sinks.Delete
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)
22+--
23+-- Deletes a sink. If the sink has a unique writer_identity, then that
24+-- service account is also deleted.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.sinks.delete@.
27+module Network.Google.Resource.Logging.Folders.Sinks.Delete
28+ (
29+ -- * REST Resource
30+ FoldersSinksDeleteResource
31+
32+ -- * Creating a Request
33+ , foldersSinksDelete
34+ , FoldersSinksDelete
35+
36+ -- * Request Lenses
37+ , fsdXgafv
38+ , fsdUploadProtocol
39+ , fsdPp
40+ , fsdAccessToken
41+ , fsdUploadType
42+ , fsdBearerToken
43+ , fsdSinkName
44+ , fsdCallback
45+ ) where
46+
47+import Network.Google.Logging.Types
48+import Network.Google.Prelude
49+
50+-- | A resource alias for @logging.folders.sinks.delete@ method which the
51+-- 'FoldersSinksDelete' request conforms to.
52+type FoldersSinksDeleteResource =
53+ "v2" :>
54+ Capture "sinkName" Text :>
55+ QueryParam "$.xgafv" Xgafv :>
56+ QueryParam "upload_protocol" Text :>
57+ QueryParam "pp" Bool :>
58+ QueryParam "access_token" Text :>
59+ QueryParam "uploadType" Text :>
60+ QueryParam "bearer_token" Text :>
61+ QueryParam "callback" Text :>
62+ QueryParam "alt" AltJSON :> Delete '[JSON] Empty
63+
64+-- | Deletes a sink. If the sink has a unique writer_identity, then that
65+-- service account is also deleted.
66+--
67+-- /See:/ 'foldersSinksDelete' smart constructor.
68+data FoldersSinksDelete = FoldersSinksDelete'
69+ { _fsdXgafv :: !(Maybe Xgafv)
70+ , _fsdUploadProtocol :: !(Maybe Text)
71+ , _fsdPp :: !Bool
72+ , _fsdAccessToken :: !(Maybe Text)
73+ , _fsdUploadType :: !(Maybe Text)
74+ , _fsdBearerToken :: !(Maybe Text)
75+ , _fsdSinkName :: !Text
76+ , _fsdCallback :: !(Maybe Text)
77+ } deriving (Eq,Show,Data,Typeable,Generic)
78+
79+-- | Creates a value of 'FoldersSinksDelete' with the minimum fields required to make a request.
80+--
81+-- Use one of the following lenses to modify other fields as desired:
82+--
83+-- * 'fsdXgafv'
84+--
85+-- * 'fsdUploadProtocol'
86+--
87+-- * 'fsdPp'
88+--
89+-- * 'fsdAccessToken'
90+--
91+-- * 'fsdUploadType'
92+--
93+-- * 'fsdBearerToken'
94+--
95+-- * 'fsdSinkName'
96+--
97+-- * 'fsdCallback'
98+foldersSinksDelete
99+ :: Text -- ^ 'fsdSinkName'
100+ -> FoldersSinksDelete
101+foldersSinksDelete pFsdSinkName_ =
102+ FoldersSinksDelete'
103+ { _fsdXgafv = Nothing
104+ , _fsdUploadProtocol = Nothing
105+ , _fsdPp = True
106+ , _fsdAccessToken = Nothing
107+ , _fsdUploadType = Nothing
108+ , _fsdBearerToken = Nothing
109+ , _fsdSinkName = pFsdSinkName_
110+ , _fsdCallback = Nothing
111+ }
112+
113+-- | V1 error format.
114+fsdXgafv :: Lens' FoldersSinksDelete (Maybe Xgafv)
115+fsdXgafv = lens _fsdXgafv (\ s a -> s{_fsdXgafv = a})
116+
117+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
118+fsdUploadProtocol :: Lens' FoldersSinksDelete (Maybe Text)
119+fsdUploadProtocol
120+ = lens _fsdUploadProtocol
121+ (\ s a -> s{_fsdUploadProtocol = a})
122+
123+-- | Pretty-print response.
124+fsdPp :: Lens' FoldersSinksDelete Bool
125+fsdPp = lens _fsdPp (\ s a -> s{_fsdPp = a})
126+
127+-- | OAuth access token.
128+fsdAccessToken :: Lens' FoldersSinksDelete (Maybe Text)
129+fsdAccessToken
130+ = lens _fsdAccessToken
131+ (\ s a -> s{_fsdAccessToken = a})
132+
133+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
134+fsdUploadType :: Lens' FoldersSinksDelete (Maybe Text)
135+fsdUploadType
136+ = lens _fsdUploadType
137+ (\ s a -> s{_fsdUploadType = a})
138+
139+-- | OAuth bearer token.
140+fsdBearerToken :: Lens' FoldersSinksDelete (Maybe Text)
141+fsdBearerToken
142+ = lens _fsdBearerToken
143+ (\ s a -> s{_fsdBearerToken = a})
144+
145+-- | Required. The full resource name of the sink to delete, including the
146+-- parent resource and the sink identifier:
147+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
148+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" It is an error if
149+-- the sink does not exist. Example:
150+-- \"projects\/my-project-id\/sinks\/my-sink-id\". It is an error if the
151+-- sink does not exist.
152+fsdSinkName :: Lens' FoldersSinksDelete Text
153+fsdSinkName
154+ = lens _fsdSinkName (\ s a -> s{_fsdSinkName = a})
155+
156+-- | JSONP
157+fsdCallback :: Lens' FoldersSinksDelete (Maybe Text)
158+fsdCallback
159+ = lens _fsdCallback (\ s a -> s{_fsdCallback = a})
160+
161+instance GoogleRequest FoldersSinksDelete where
162+ type Rs FoldersSinksDelete = Empty
163+ type Scopes FoldersSinksDelete =
164+ '["https://www.googleapis.com/auth/cloud-platform",
165+ "https://www.googleapis.com/auth/logging.admin"]
166+ requestClient FoldersSinksDelete'{..}
167+ = go _fsdSinkName _fsdXgafv _fsdUploadProtocol
168+ (Just _fsdPp)
169+ _fsdAccessToken
170+ _fsdUploadType
171+ _fsdBearerToken
172+ _fsdCallback
173+ (Just AltJSON)
174+ loggingService
175+ where go
176+ = buildClient
177+ (Proxy :: Proxy FoldersSinksDeleteResource)
178+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Get.hsnew file+175
@@ -0,0 +1,175 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Sinks.Get
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)
22+--
23+-- Gets a sink.
24+--
25+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.sinks.get@.
26+module Network.Google.Resource.Logging.Folders.Sinks.Get
27+ (
28+ -- * REST Resource
29+ FoldersSinksGetResource
30+
31+ -- * Creating a Request
32+ , foldersSinksGet
33+ , FoldersSinksGet
34+
35+ -- * Request Lenses
36+ , fsgXgafv
37+ , fsgUploadProtocol
38+ , fsgPp
39+ , fsgAccessToken
40+ , fsgUploadType
41+ , fsgBearerToken
42+ , fsgSinkName
43+ , fsgCallback
44+ ) where
45+
46+import Network.Google.Logging.Types
47+import Network.Google.Prelude
48+
49+-- | A resource alias for @logging.folders.sinks.get@ method which the
50+-- 'FoldersSinksGet' request conforms to.
51+type FoldersSinksGetResource =
52+ "v2" :>
53+ Capture "sinkName" Text :>
54+ QueryParam "$.xgafv" Xgafv :>
55+ QueryParam "upload_protocol" Text :>
56+ QueryParam "pp" Bool :>
57+ QueryParam "access_token" Text :>
58+ QueryParam "uploadType" Text :>
59+ QueryParam "bearer_token" Text :>
60+ QueryParam "callback" Text :>
61+ QueryParam "alt" AltJSON :> Get '[JSON] LogSink
62+
63+-- | Gets a sink.
64+--
65+-- /See:/ 'foldersSinksGet' smart constructor.
66+data FoldersSinksGet = FoldersSinksGet'
67+ { _fsgXgafv :: !(Maybe Xgafv)
68+ , _fsgUploadProtocol :: !(Maybe Text)
69+ , _fsgPp :: !Bool
70+ , _fsgAccessToken :: !(Maybe Text)
71+ , _fsgUploadType :: !(Maybe Text)
72+ , _fsgBearerToken :: !(Maybe Text)
73+ , _fsgSinkName :: !Text
74+ , _fsgCallback :: !(Maybe Text)
75+ } deriving (Eq,Show,Data,Typeable,Generic)
76+
77+-- | Creates a value of 'FoldersSinksGet' with the minimum fields required to make a request.
78+--
79+-- Use one of the following lenses to modify other fields as desired:
80+--
81+-- * 'fsgXgafv'
82+--
83+-- * 'fsgUploadProtocol'
84+--
85+-- * 'fsgPp'
86+--
87+-- * 'fsgAccessToken'
88+--
89+-- * 'fsgUploadType'
90+--
91+-- * 'fsgBearerToken'
92+--
93+-- * 'fsgSinkName'
94+--
95+-- * 'fsgCallback'
96+foldersSinksGet
97+ :: Text -- ^ 'fsgSinkName'
98+ -> FoldersSinksGet
99+foldersSinksGet pFsgSinkName_ =
100+ FoldersSinksGet'
101+ { _fsgXgafv = Nothing
102+ , _fsgUploadProtocol = Nothing
103+ , _fsgPp = True
104+ , _fsgAccessToken = Nothing
105+ , _fsgUploadType = Nothing
106+ , _fsgBearerToken = Nothing
107+ , _fsgSinkName = pFsgSinkName_
108+ , _fsgCallback = Nothing
109+ }
110+
111+-- | V1 error format.
112+fsgXgafv :: Lens' FoldersSinksGet (Maybe Xgafv)
113+fsgXgafv = lens _fsgXgafv (\ s a -> s{_fsgXgafv = a})
114+
115+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
116+fsgUploadProtocol :: Lens' FoldersSinksGet (Maybe Text)
117+fsgUploadProtocol
118+ = lens _fsgUploadProtocol
119+ (\ s a -> s{_fsgUploadProtocol = a})
120+
121+-- | Pretty-print response.
122+fsgPp :: Lens' FoldersSinksGet Bool
123+fsgPp = lens _fsgPp (\ s a -> s{_fsgPp = a})
124+
125+-- | OAuth access token.
126+fsgAccessToken :: Lens' FoldersSinksGet (Maybe Text)
127+fsgAccessToken
128+ = lens _fsgAccessToken
129+ (\ s a -> s{_fsgAccessToken = a})
130+
131+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
132+fsgUploadType :: Lens' FoldersSinksGet (Maybe Text)
133+fsgUploadType
134+ = lens _fsgUploadType
135+ (\ s a -> s{_fsgUploadType = a})
136+
137+-- | OAuth bearer token.
138+fsgBearerToken :: Lens' FoldersSinksGet (Maybe Text)
139+fsgBearerToken
140+ = lens _fsgBearerToken
141+ (\ s a -> s{_fsgBearerToken = a})
142+
143+-- | Required. The parent resource name of the sink:
144+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
145+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
146+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
147+fsgSinkName :: Lens' FoldersSinksGet Text
148+fsgSinkName
149+ = lens _fsgSinkName (\ s a -> s{_fsgSinkName = a})
150+
151+-- | JSONP
152+fsgCallback :: Lens' FoldersSinksGet (Maybe Text)
153+fsgCallback
154+ = lens _fsgCallback (\ s a -> s{_fsgCallback = a})
155+
156+instance GoogleRequest FoldersSinksGet where
157+ type Rs FoldersSinksGet = LogSink
158+ type Scopes FoldersSinksGet =
159+ '["https://www.googleapis.com/auth/cloud-platform",
160+ "https://www.googleapis.com/auth/cloud-platform.read-only",
161+ "https://www.googleapis.com/auth/logging.admin",
162+ "https://www.googleapis.com/auth/logging.read"]
163+ requestClient FoldersSinksGet'{..}
164+ = go _fsgSinkName _fsgXgafv _fsgUploadProtocol
165+ (Just _fsgPp)
166+ _fsgAccessToken
167+ _fsgUploadType
168+ _fsgBearerToken
169+ _fsgCallback
170+ (Just AltJSON)
171+ loggingService
172+ where go
173+ = buildClient
174+ (Proxy :: Proxy FoldersSinksGetResource)
175+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/List.hsnew file+205
@@ -0,0 +1,205 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Sinks.List
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)
22+--
23+-- Lists sinks.
24+--
25+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.sinks.list@.
26+module Network.Google.Resource.Logging.Folders.Sinks.List
27+ (
28+ -- * REST Resource
29+ FoldersSinksListResource
30+
31+ -- * Creating a Request
32+ , foldersSinksList
33+ , FoldersSinksList
34+
35+ -- * Request Lenses
36+ , fslParent
37+ , fslXgafv
38+ , fslUploadProtocol
39+ , fslPp
40+ , fslAccessToken
41+ , fslUploadType
42+ , fslBearerToken
43+ , fslPageToken
44+ , fslPageSize
45+ , fslCallback
46+ ) where
47+
48+import Network.Google.Logging.Types
49+import Network.Google.Prelude
50+
51+-- | A resource alias for @logging.folders.sinks.list@ method which the
52+-- 'FoldersSinksList' request conforms to.
53+type FoldersSinksListResource =
54+ "v2" :>
55+ Capture "parent" Text :>
56+ "sinks" :>
57+ QueryParam "$.xgafv" Xgafv :>
58+ QueryParam "upload_protocol" Text :>
59+ QueryParam "pp" Bool :>
60+ QueryParam "access_token" Text :>
61+ QueryParam "uploadType" Text :>
62+ QueryParam "bearer_token" Text :>
63+ QueryParam "pageToken" Text :>
64+ QueryParam "pageSize" (Textual Int32) :>
65+ QueryParam "callback" Text :>
66+ QueryParam "alt" AltJSON :>
67+ Get '[JSON] ListSinksResponse
68+
69+-- | Lists sinks.
70+--
71+-- /See:/ 'foldersSinksList' smart constructor.
72+data FoldersSinksList = FoldersSinksList'
73+ { _fslParent :: !Text
74+ , _fslXgafv :: !(Maybe Xgafv)
75+ , _fslUploadProtocol :: !(Maybe Text)
76+ , _fslPp :: !Bool
77+ , _fslAccessToken :: !(Maybe Text)
78+ , _fslUploadType :: !(Maybe Text)
79+ , _fslBearerToken :: !(Maybe Text)
80+ , _fslPageToken :: !(Maybe Text)
81+ , _fslPageSize :: !(Maybe (Textual Int32))
82+ , _fslCallback :: !(Maybe Text)
83+ } deriving (Eq,Show,Data,Typeable,Generic)
84+
85+-- | Creates a value of 'FoldersSinksList' with the minimum fields required to make a request.
86+--
87+-- Use one of the following lenses to modify other fields as desired:
88+--
89+-- * 'fslParent'
90+--
91+-- * 'fslXgafv'
92+--
93+-- * 'fslUploadProtocol'
94+--
95+-- * 'fslPp'
96+--
97+-- * 'fslAccessToken'
98+--
99+-- * 'fslUploadType'
100+--
101+-- * 'fslBearerToken'
102+--
103+-- * 'fslPageToken'
104+--
105+-- * 'fslPageSize'
106+--
107+-- * 'fslCallback'
108+foldersSinksList
109+ :: Text -- ^ 'fslParent'
110+ -> FoldersSinksList
111+foldersSinksList pFslParent_ =
112+ FoldersSinksList'
113+ { _fslParent = pFslParent_
114+ , _fslXgafv = Nothing
115+ , _fslUploadProtocol = Nothing
116+ , _fslPp = True
117+ , _fslAccessToken = Nothing
118+ , _fslUploadType = Nothing
119+ , _fslBearerToken = Nothing
120+ , _fslPageToken = Nothing
121+ , _fslPageSize = Nothing
122+ , _fslCallback = Nothing
123+ }
124+
125+-- | Required. The parent resource whose sinks are to be listed. Examples:
126+-- \"projects\/my-logging-project\", \"organizations\/123456789\".
127+fslParent :: Lens' FoldersSinksList Text
128+fslParent
129+ = lens _fslParent (\ s a -> s{_fslParent = a})
130+
131+-- | V1 error format.
132+fslXgafv :: Lens' FoldersSinksList (Maybe Xgafv)
133+fslXgafv = lens _fslXgafv (\ s a -> s{_fslXgafv = a})
134+
135+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
136+fslUploadProtocol :: Lens' FoldersSinksList (Maybe Text)
137+fslUploadProtocol
138+ = lens _fslUploadProtocol
139+ (\ s a -> s{_fslUploadProtocol = a})
140+
141+-- | Pretty-print response.
142+fslPp :: Lens' FoldersSinksList Bool
143+fslPp = lens _fslPp (\ s a -> s{_fslPp = a})
144+
145+-- | OAuth access token.
146+fslAccessToken :: Lens' FoldersSinksList (Maybe Text)
147+fslAccessToken
148+ = lens _fslAccessToken
149+ (\ s a -> s{_fslAccessToken = a})
150+
151+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
152+fslUploadType :: Lens' FoldersSinksList (Maybe Text)
153+fslUploadType
154+ = lens _fslUploadType
155+ (\ s a -> s{_fslUploadType = a})
156+
157+-- | OAuth bearer token.
158+fslBearerToken :: Lens' FoldersSinksList (Maybe Text)
159+fslBearerToken
160+ = lens _fslBearerToken
161+ (\ s a -> s{_fslBearerToken = a})
162+
163+-- | Optional. If present, then retrieve the next batch of results from the
164+-- preceding call to this method. pageToken must be the value of
165+-- nextPageToken from the previous response. The values of other method
166+-- parameters should be identical to those in the previous call.
167+fslPageToken :: Lens' FoldersSinksList (Maybe Text)
168+fslPageToken
169+ = lens _fslPageToken (\ s a -> s{_fslPageToken = a})
170+
171+-- | Optional. The maximum number of results to return from this request.
172+-- Non-positive values are ignored. The presence of nextPageToken in the
173+-- response indicates that more results might be available.
174+fslPageSize :: Lens' FoldersSinksList (Maybe Int32)
175+fslPageSize
176+ = lens _fslPageSize (\ s a -> s{_fslPageSize = a}) .
177+ mapping _Coerce
178+
179+-- | JSONP
180+fslCallback :: Lens' FoldersSinksList (Maybe Text)
181+fslCallback
182+ = lens _fslCallback (\ s a -> s{_fslCallback = a})
183+
184+instance GoogleRequest FoldersSinksList where
185+ type Rs FoldersSinksList = ListSinksResponse
186+ type Scopes FoldersSinksList =
187+ '["https://www.googleapis.com/auth/cloud-platform",
188+ "https://www.googleapis.com/auth/cloud-platform.read-only",
189+ "https://www.googleapis.com/auth/logging.admin",
190+ "https://www.googleapis.com/auth/logging.read"]
191+ requestClient FoldersSinksList'{..}
192+ = go _fslParent _fslXgafv _fslUploadProtocol
193+ (Just _fslPp)
194+ _fslAccessToken
195+ _fslUploadType
196+ _fslBearerToken
197+ _fslPageToken
198+ _fslPageSize
199+ _fslCallback
200+ (Just AltJSON)
201+ loggingService
202+ where go
203+ = buildClient
204+ (Proxy :: Proxy FoldersSinksListResource)
205+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Folders/Sinks/Update.hsnew file+217
@@ -0,0 +1,217 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Folders.Sinks.Update
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)
22+--
23+-- Updates a sink. If the named sink doesn\'t exist, then this method is
24+-- identical to sinks.create. If the named sink does exist, then this
25+-- method replaces the following fields in the existing sink with values
26+-- from the new sink: destination, filter, output_version_format,
27+-- start_time, and end_time. The updated filter might also have a new
28+-- writer_identity; see the unique_writer_identity field.
29+--
30+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.folders.sinks.update@.
31+module Network.Google.Resource.Logging.Folders.Sinks.Update
32+ (
33+ -- * REST Resource
34+ FoldersSinksUpdateResource
35+
36+ -- * Creating a Request
37+ , foldersSinksUpdate
38+ , FoldersSinksUpdate
39+
40+ -- * Request Lenses
41+ , fsuXgafv
42+ , fsuUniqueWriterIdentity
43+ , fsuUploadProtocol
44+ , fsuPp
45+ , fsuAccessToken
46+ , fsuUploadType
47+ , fsuPayload
48+ , fsuBearerToken
49+ , fsuSinkName
50+ , fsuCallback
51+ ) where
52+
53+import Network.Google.Logging.Types
54+import Network.Google.Prelude
55+
56+-- | A resource alias for @logging.folders.sinks.update@ method which the
57+-- 'FoldersSinksUpdate' request conforms to.
58+type FoldersSinksUpdateResource =
59+ "v2" :>
60+ Capture "sinkName" Text :>
61+ QueryParam "$.xgafv" Xgafv :>
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
71+
72+-- | Updates a sink. If the named sink doesn\'t exist, then this method is
73+-- identical to sinks.create. If the named sink does exist, then this
74+-- method replaces the following fields in the existing sink with values
75+-- from the new sink: destination, filter, output_version_format,
76+-- start_time, and end_time. The updated filter might also have a new
77+-- writer_identity; see the unique_writer_identity field.
78+--
79+-- /See:/ 'foldersSinksUpdate' smart constructor.
80+data FoldersSinksUpdate = FoldersSinksUpdate'
81+ { _fsuXgafv :: !(Maybe Xgafv)
82+ , _fsuUniqueWriterIdentity :: !(Maybe Bool)
83+ , _fsuUploadProtocol :: !(Maybe Text)
84+ , _fsuPp :: !Bool
85+ , _fsuAccessToken :: !(Maybe Text)
86+ , _fsuUploadType :: !(Maybe Text)
87+ , _fsuPayload :: !LogSink
88+ , _fsuBearerToken :: !(Maybe Text)
89+ , _fsuSinkName :: !Text
90+ , _fsuCallback :: !(Maybe Text)
91+ } deriving (Eq,Show,Data,Typeable,Generic)
92+
93+-- | Creates a value of 'FoldersSinksUpdate' with the minimum fields required to make a request.
94+--
95+-- Use one of the following lenses to modify other fields as desired:
96+--
97+-- * 'fsuXgafv'
98+--
99+-- * 'fsuUniqueWriterIdentity'
100+--
101+-- * 'fsuUploadProtocol'
102+--
103+-- * 'fsuPp'
104+--
105+-- * 'fsuAccessToken'
106+--
107+-- * 'fsuUploadType'
108+--
109+-- * 'fsuPayload'
110+--
111+-- * 'fsuBearerToken'
112+--
113+-- * 'fsuSinkName'
114+--
115+-- * 'fsuCallback'
116+foldersSinksUpdate
117+ :: LogSink -- ^ 'fsuPayload'
118+ -> Text -- ^ 'fsuSinkName'
119+ -> FoldersSinksUpdate
120+foldersSinksUpdate pFsuPayload_ pFsuSinkName_ =
121+ FoldersSinksUpdate'
122+ { _fsuXgafv = Nothing
123+ , _fsuUniqueWriterIdentity = Nothing
124+ , _fsuUploadProtocol = Nothing
125+ , _fsuPp = True
126+ , _fsuAccessToken = Nothing
127+ , _fsuUploadType = Nothing
128+ , _fsuPayload = pFsuPayload_
129+ , _fsuBearerToken = Nothing
130+ , _fsuSinkName = pFsuSinkName_
131+ , _fsuCallback = Nothing
132+ }
133+
134+-- | V1 error format.
135+fsuXgafv :: Lens' FoldersSinksUpdate (Maybe Xgafv)
136+fsuXgafv = lens _fsuXgafv (\ s a -> s{_fsuXgafv = a})
137+
138+-- | Optional. See sinks.create for a description of this field. When
139+-- updating a sink, the effect of this field on the value of
140+-- writer_identity in the updated sink depends on both the old and new
141+-- values of this field: If the old and new values of this field are both
142+-- false or both true, then there is no change to the sink\'s
143+-- writer_identity. If the old value was false and the new value is true,
144+-- then writer_identity is changed to a unique service account. It is an
145+-- error if the old value was true and the new value is false.
146+fsuUniqueWriterIdentity :: Lens' FoldersSinksUpdate (Maybe Bool)
147+fsuUniqueWriterIdentity
148+ = lens _fsuUniqueWriterIdentity
149+ (\ s a -> s{_fsuUniqueWriterIdentity = a})
150+
151+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
152+fsuUploadProtocol :: Lens' FoldersSinksUpdate (Maybe Text)
153+fsuUploadProtocol
154+ = lens _fsuUploadProtocol
155+ (\ s a -> s{_fsuUploadProtocol = a})
156+
157+-- | Pretty-print response.
158+fsuPp :: Lens' FoldersSinksUpdate Bool
159+fsuPp = lens _fsuPp (\ s a -> s{_fsuPp = a})
160+
161+-- | OAuth access token.
162+fsuAccessToken :: Lens' FoldersSinksUpdate (Maybe Text)
163+fsuAccessToken
164+ = lens _fsuAccessToken
165+ (\ s a -> s{_fsuAccessToken = a})
166+
167+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
168+fsuUploadType :: Lens' FoldersSinksUpdate (Maybe Text)
169+fsuUploadType
170+ = lens _fsuUploadType
171+ (\ s a -> s{_fsuUploadType = a})
172+
173+-- | Multipart request metadata.
174+fsuPayload :: Lens' FoldersSinksUpdate LogSink
175+fsuPayload
176+ = lens _fsuPayload (\ s a -> s{_fsuPayload = a})
177+
178+-- | OAuth bearer token.
179+fsuBearerToken :: Lens' FoldersSinksUpdate (Maybe Text)
180+fsuBearerToken
181+ = lens _fsuBearerToken
182+ (\ s a -> s{_fsuBearerToken = a})
183+
184+-- | Required. The full resource name of the sink to update, including the
185+-- parent resource and the sink identifier:
186+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
187+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
188+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
189+fsuSinkName :: Lens' FoldersSinksUpdate Text
190+fsuSinkName
191+ = lens _fsuSinkName (\ s a -> s{_fsuSinkName = a})
192+
193+-- | JSONP
194+fsuCallback :: Lens' FoldersSinksUpdate (Maybe Text)
195+fsuCallback
196+ = lens _fsuCallback (\ s a -> s{_fsuCallback = a})
197+
198+instance GoogleRequest FoldersSinksUpdate where
199+ type Rs FoldersSinksUpdate = LogSink
200+ type Scopes FoldersSinksUpdate =
201+ '["https://www.googleapis.com/auth/cloud-platform",
202+ "https://www.googleapis.com/auth/logging.admin"]
203+ requestClient FoldersSinksUpdate'{..}
204+ = go _fsuSinkName _fsuXgafv _fsuUniqueWriterIdentity
205+ _fsuUploadProtocol
206+ (Just _fsuPp)
207+ _fsuAccessToken
208+ _fsuUploadType
209+ _fsuBearerToken
210+ _fsuCallback
211+ (Just AltJSON)
212+ _fsuPayload
213+ loggingService
214+ where go
215+ = buildClient
216+ (Proxy :: Proxy FoldersSinksUpdateResource)
217+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/MonitoredResourceDescriptors/List.hs+8−6
@@ -20,7 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Lists the monitored resource descriptors used by Stackdriver Logging.
23+-- Lists the descriptors for monitored resource types used by Stackdriver
24+-- Logging.
2425--
2526-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.monitoredResourceDescriptors.list@.
2627module Network.Google.Resource.Logging.MonitoredResourceDescriptors.List
@@ -65,7 +66,8 @@ type MonitoredResourceDescriptorsListResource =
6566 Get '[JSON]
6667 ListMonitoredResourceDescriptorsResponse
6768
68−-- | Lists the monitored resource descriptors used by Stackdriver Logging.
69+-- | Lists the descriptors for monitored resource types used by Stackdriver
70+-- Logging.
6971--
7072-- /See:/ 'monitoredResourceDescriptorsList' smart constructor.
7173data MonitoredResourceDescriptorsList = MonitoredResourceDescriptorsList'
@@ -150,8 +152,8 @@ mrdlBearerToken
150152 (\ s a -> s{_mrdlBearerToken = a})
151153
152154-- | Optional. If present, then retrieve the next batch of results from the
153−-- preceding call to this method. \`pageToken\` must be the value of
154−-- \`nextPageToken\` from the previous response. The values of other method
155+-- preceding call to this method. pageToken must be the value of
156+-- nextPageToken from the previous response. The values of other method
155157-- parameters should be identical to those in the previous call.
156158mrdlPageToken :: Lens' MonitoredResourceDescriptorsList (Maybe Text)
157159mrdlPageToken
@@ -159,8 +161,8 @@ mrdlPageToken
159161 (\ s a -> s{_mrdlPageToken = a})
160162
161163-- | Optional. The maximum number of results to return from this request.
162−-- Non-positive values are ignored. The presence of \`nextPageToken\` in
163−-- the response indicates that more results might be available.
164+-- Non-positive values are ignored. The presence of nextPageToken in the
165+-- response indicates that more results might be available.
164166mrdlPageSize :: Lens' MonitoredResourceDescriptorsList (Maybe Int32)
165167mrdlPageSize
166168 = lens _mrdlPageSize (\ s a -> s{_mrdlPageSize = a})
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Logs/Delete.hs+10−6
@@ -20,8 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Deletes a log and all its log entries. The log will reappear if it
24−-- receives new entries.
23+-- Deletes all the log entries in a log. The log reappears if it receives
24+-- new entries.
2525--
2626-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.organizations.logs.delete@.
2727module Network.Google.Resource.Logging.Organizations.Logs.Delete
@@ -61,8 +61,8 @@ type OrganizationsLogsDeleteResource =
6161 QueryParam "callback" Text :>
6262 QueryParam "alt" AltJSON :> Delete '[JSON] Empty
6363
64−-- | Deletes a log and all its log entries. The log will reappear if it
65−-- receives new entries.
64+-- | Deletes all the log entries in a log. The log reappears if it receives
65+-- new entries.
6666--
6767-- /See:/ 'organizationsLogsDelete' smart constructor.
6868data OrganizationsLogsDelete = OrganizationsLogsDelete'
@@ -142,8 +142,12 @@ oldBearerToken
142142 = lens _oldBearerToken
143143 (\ s a -> s{_oldBearerToken = a})
144144
145−-- | Required. The resource name of the log to delete. Example:
146−-- \`\"projects\/my-project\/logs\/syslog\"\`.
145+-- | Required. The resource name of the log to delete:
146+-- \"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\"
147+-- \"organizations\/[ORGANIZATION_ID]\/logs\/[LOG_ID]\" [LOG_ID] must be
148+-- URL-encoded. For example, \"projects\/my-project-id\/logs\/syslog\",
149+-- \"organizations\/1234567890\/logs\/cloudresourcemanager.googleapis.com%2Factivity\".
150+-- For more information about log names, see LogEntry.
147151oldLogName :: Lens' OrganizationsLogsDelete Text
148152oldLogName
149153 = lens _oldLogName (\ s a -> s{_oldLogName = a})
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Logs/List.hsnew file+207
@@ -0,0 +1,207 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Organizations.Logs.List
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)
22+--
23+-- Lists the logs in projects or organizations. Only logs that have entries
24+-- are listed.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.organizations.logs.list@.
27+module Network.Google.Resource.Logging.Organizations.Logs.List
28+ (
29+ -- * REST Resource
30+ OrganizationsLogsListResource
31+
32+ -- * Creating a Request
33+ , organizationsLogsList
34+ , OrganizationsLogsList
35+
36+ -- * Request Lenses
37+ , ollParent
38+ , ollXgafv
39+ , ollUploadProtocol
40+ , ollPp
41+ , ollAccessToken
42+ , ollUploadType
43+ , ollBearerToken
44+ , ollPageToken
45+ , ollPageSize
46+ , ollCallback
47+ ) where
48+
49+import Network.Google.Logging.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @logging.organizations.logs.list@ method which the
53+-- 'OrganizationsLogsList' request conforms to.
54+type OrganizationsLogsListResource =
55+ "v2" :>
56+ Capture "parent" Text :>
57+ "logs" :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "pageToken" Text :>
65+ QueryParam "pageSize" (Textual Int32) :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ Get '[JSON] ListLogsResponse
69+
70+-- | Lists the logs in projects or organizations. Only logs that have entries
71+-- are listed.
72+--
73+-- /See:/ 'organizationsLogsList' smart constructor.
74+data OrganizationsLogsList = OrganizationsLogsList'
75+ { _ollParent :: !Text
76+ , _ollXgafv :: !(Maybe Xgafv)
77+ , _ollUploadProtocol :: !(Maybe Text)
78+ , _ollPp :: !Bool
79+ , _ollAccessToken :: !(Maybe Text)
80+ , _ollUploadType :: !(Maybe Text)
81+ , _ollBearerToken :: !(Maybe Text)
82+ , _ollPageToken :: !(Maybe Text)
83+ , _ollPageSize :: !(Maybe (Textual Int32))
84+ , _ollCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'OrganizationsLogsList' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'ollParent'
92+--
93+-- * 'ollXgafv'
94+--
95+-- * 'ollUploadProtocol'
96+--
97+-- * 'ollPp'
98+--
99+-- * 'ollAccessToken'
100+--
101+-- * 'ollUploadType'
102+--
103+-- * 'ollBearerToken'
104+--
105+-- * 'ollPageToken'
106+--
107+-- * 'ollPageSize'
108+--
109+-- * 'ollCallback'
110+organizationsLogsList
111+ :: Text -- ^ 'ollParent'
112+ -> OrganizationsLogsList
113+organizationsLogsList pOllParent_ =
114+ OrganizationsLogsList'
115+ { _ollParent = pOllParent_
116+ , _ollXgafv = Nothing
117+ , _ollUploadProtocol = Nothing
118+ , _ollPp = True
119+ , _ollAccessToken = Nothing
120+ , _ollUploadType = Nothing
121+ , _ollBearerToken = Nothing
122+ , _ollPageToken = Nothing
123+ , _ollPageSize = Nothing
124+ , _ollCallback = Nothing
125+ }
126+
127+-- | Required. The resource name that owns the logs:
128+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
129+ollParent :: Lens' OrganizationsLogsList Text
130+ollParent
131+ = lens _ollParent (\ s a -> s{_ollParent = a})
132+
133+-- | V1 error format.
134+ollXgafv :: Lens' OrganizationsLogsList (Maybe Xgafv)
135+ollXgafv = lens _ollXgafv (\ s a -> s{_ollXgafv = a})
136+
137+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
138+ollUploadProtocol :: Lens' OrganizationsLogsList (Maybe Text)
139+ollUploadProtocol
140+ = lens _ollUploadProtocol
141+ (\ s a -> s{_ollUploadProtocol = a})
142+
143+-- | Pretty-print response.
144+ollPp :: Lens' OrganizationsLogsList Bool
145+ollPp = lens _ollPp (\ s a -> s{_ollPp = a})
146+
147+-- | OAuth access token.
148+ollAccessToken :: Lens' OrganizationsLogsList (Maybe Text)
149+ollAccessToken
150+ = lens _ollAccessToken
151+ (\ s a -> s{_ollAccessToken = a})
152+
153+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
154+ollUploadType :: Lens' OrganizationsLogsList (Maybe Text)
155+ollUploadType
156+ = lens _ollUploadType
157+ (\ s a -> s{_ollUploadType = a})
158+
159+-- | OAuth bearer token.
160+ollBearerToken :: Lens' OrganizationsLogsList (Maybe Text)
161+ollBearerToken
162+ = lens _ollBearerToken
163+ (\ s a -> s{_ollBearerToken = a})
164+
165+-- | Optional. If present, then retrieve the next batch of results from the
166+-- preceding call to this method. pageToken must be the value of
167+-- nextPageToken from the previous response. The values of other method
168+-- parameters should be identical to those in the previous call.
169+ollPageToken :: Lens' OrganizationsLogsList (Maybe Text)
170+ollPageToken
171+ = lens _ollPageToken (\ s a -> s{_ollPageToken = a})
172+
173+-- | Optional. The maximum number of results to return from this request.
174+-- Non-positive values are ignored. The presence of nextPageToken in the
175+-- response indicates that more results might be available.
176+ollPageSize :: Lens' OrganizationsLogsList (Maybe Int32)
177+ollPageSize
178+ = lens _ollPageSize (\ s a -> s{_ollPageSize = a}) .
179+ mapping _Coerce
180+
181+-- | JSONP
182+ollCallback :: Lens' OrganizationsLogsList (Maybe Text)
183+ollCallback
184+ = lens _ollCallback (\ s a -> s{_ollCallback = a})
185+
186+instance GoogleRequest OrganizationsLogsList where
187+ type Rs OrganizationsLogsList = ListLogsResponse
188+ type Scopes OrganizationsLogsList =
189+ '["https://www.googleapis.com/auth/cloud-platform",
190+ "https://www.googleapis.com/auth/cloud-platform.read-only",
191+ "https://www.googleapis.com/auth/logging.admin",
192+ "https://www.googleapis.com/auth/logging.read"]
193+ requestClient OrganizationsLogsList'{..}
194+ = go _ollParent _ollXgafv _ollUploadProtocol
195+ (Just _ollPp)
196+ _ollAccessToken
197+ _ollUploadType
198+ _ollBearerToken
199+ _ollPageToken
200+ _ollPageSize
201+ _ollCallback
202+ (Just AltJSON)
203+ loggingService
204+ where go
205+ = buildClient
206+ (Proxy :: Proxy OrganizationsLogsListResource)
207+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Create.hs+55−24
@@ -20,7 +20,11 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Creates a sink.
23+-- Creates a sink that exports specified log entries to a destination. The
24+-- export of newly-ingested log entries begins immediately, unless the
25+-- current time is outside the sink\'s start and end times or the sink\'s
26+-- writer_identity is not permitted to write to the destination. A sink can
27+-- export log entries only from the resource owning the sink.
2428--
2529-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.organizations.sinks.create@.
2630module Network.Google.Resource.Logging.Organizations.Sinks.Create
@@ -35,6 +39,7 @@ module Network.Google.Resource.Logging.Organizations.Sinks.Create
3539 -- * Request Lenses
3640 , oscParent
3741 , oscXgafv
42+ , oscUniqueWriterIdentity
3843 , oscUploadProtocol
3944 , oscPp
4045 , oscAccessToken
@@ -54,28 +59,34 @@ type OrganizationsSinksCreateResource =
5459 Capture "parent" Text :>
5560 "sinks" :>
5661 QueryParam "$.xgafv" Xgafv :>
57− QueryParam "upload_protocol" Text :>
58− QueryParam "pp" Bool :>
59− QueryParam "access_token" Text :>
60− QueryParam "uploadType" Text :>
61− QueryParam "bearer_token" Text :>
62− QueryParam "callback" Text :>
63− QueryParam "alt" AltJSON :>
64− ReqBody '[JSON] LogSink :> Post '[JSON] LogSink
65−
66−-- | Creates a sink.
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Post '[JSON] LogSink
71+
72+-- | Creates a sink that exports specified log entries to a destination. The
73+-- export of newly-ingested log entries begins immediately, unless the
74+-- current time is outside the sink\'s start and end times or the sink\'s
75+-- writer_identity is not permitted to write to the destination. A sink can
76+-- export log entries only from the resource owning the sink.
6777--
6878-- /See:/ 'organizationsSinksCreate' smart constructor.
6979data OrganizationsSinksCreate = OrganizationsSinksCreate'
70− { _oscParent :: !Text
71− , _oscXgafv :: !(Maybe Xgafv)
72− , _oscUploadProtocol :: !(Maybe Text)
73− , _oscPp :: !Bool
74− , _oscAccessToken :: !(Maybe Text)
75− , _oscUploadType :: !(Maybe Text)
76− , _oscPayload :: !LogSink
77− , _oscBearerToken :: !(Maybe Text)
78− , _oscCallback :: !(Maybe Text)
80+ { _oscParent :: !Text
81+ , _oscXgafv :: !(Maybe Xgafv)
82+ , _oscUniqueWriterIdentity :: !(Maybe Bool)
83+ , _oscUploadProtocol :: !(Maybe Text)
84+ , _oscPp :: !Bool
85+ , _oscAccessToken :: !(Maybe Text)
86+ , _oscUploadType :: !(Maybe Text)
87+ , _oscPayload :: !LogSink
88+ , _oscBearerToken :: !(Maybe Text)
89+ , _oscCallback :: !(Maybe Text)
7990 } deriving (Eq,Show,Data,Typeable,Generic)
8091
8192-- | Creates a value of 'OrganizationsSinksCreate' with the minimum fields required to make a request.
@@ -86,6 +97,8 @@ data OrganizationsSinksCreate = OrganizationsSinksCreate'
8697--
8798-- * 'oscXgafv'
8899--
100+-- * 'oscUniqueWriterIdentity'
101+--
89102-- * 'oscUploadProtocol'
90103--
91104-- * 'oscPp'
@@ -107,6 +120,7 @@ organizationsSinksCreate pOscParent_ pOscPayload_ =
107120 OrganizationsSinksCreate'
108121 { _oscParent = pOscParent_
109122 , _oscXgafv = Nothing
123+ , _oscUniqueWriterIdentity = Nothing
110124 , _oscUploadProtocol = Nothing
111125 , _oscPp = True
112126 , _oscAccessToken = Nothing
@@ -116,9 +130,10 @@ organizationsSinksCreate pOscParent_ pOscPayload_ =
116130 , _oscCallback = Nothing
117131 }
118132
119−-- | Required. The resource in which to create the sink. Example:
120−-- \`\"projects\/my-project-id\"\`. The new sink must be provided in the
121−-- request.
133+-- | Required. The resource in which to create the sink:
134+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
135+-- Examples: \"projects\/my-logging-project\",
136+-- \"organizations\/123456789\".
122137oscParent :: Lens' OrganizationsSinksCreate Text
123138oscParent
124139 = lens _oscParent (\ s a -> s{_oscParent = a})
@@ -127,6 +142,21 @@ oscParent
127142oscXgafv :: Lens' OrganizationsSinksCreate (Maybe Xgafv)
128143oscXgafv = lens _oscXgafv (\ s a -> s{_oscXgafv = a})
129144
145+-- | Optional. Determines the kind of IAM identity returned as
146+-- writer_identity in the new sink. If this value is omitted or set to
147+-- false, and if the sink\'s parent is a project, then the value returned
148+-- as writer_identity is cloud-logs\'google.com, the same identity used
149+-- before the addition of writer identities to this API. The sink\'s
150+-- destination must be in the same project as the sink itself.If this field
151+-- is set to true, or if the sink is owned by a non-project resource such
152+-- as an organization, then the value of writer_identity will be a unique
153+-- service account used only for exports from the new sink. For more
154+-- information, see writer_identity in LogSink.
155+oscUniqueWriterIdentity :: Lens' OrganizationsSinksCreate (Maybe Bool)
156+oscUniqueWriterIdentity
157+ = lens _oscUniqueWriterIdentity
158+ (\ s a -> s{_oscUniqueWriterIdentity = a})
159+
130160-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131161oscUploadProtocol :: Lens' OrganizationsSinksCreate (Maybe Text)
132162oscUploadProtocol
@@ -171,7 +201,8 @@ instance GoogleRequest OrganizationsSinksCreate where
171201 '["https://www.googleapis.com/auth/cloud-platform",
172202 "https://www.googleapis.com/auth/logging.admin"]
173203 requestClient OrganizationsSinksCreate'{..}
174− = go _oscParent _oscXgafv _oscUploadProtocol
204+ = go _oscParent _oscXgafv _oscUniqueWriterIdentity
205+ _oscUploadProtocol
175206 (Just _oscPp)
176207 _oscAccessToken
177208 _oscUploadType
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Delete.hs+11−6
@@ -20,7 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Deletes a sink.
23+-- Deletes a sink. If the sink has a unique writer_identity, then that
24+-- service account is also deleted.
2425--
2526-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.organizations.sinks.delete@.
2627module Network.Google.Resource.Logging.Organizations.Sinks.Delete
@@ -60,7 +61,8 @@ type OrganizationsSinksDeleteResource =
6061 QueryParam "callback" Text :>
6162 QueryParam "alt" AltJSON :> Delete '[JSON] Empty
6263
63−-- | Deletes a sink.
64+-- | Deletes a sink. If the sink has a unique writer_identity, then that
65+-- service account is also deleted.
6466--
6567-- /See:/ 'organizationsSinksDelete' smart constructor.
6668data OrganizationsSinksDelete = OrganizationsSinksDelete'
@@ -140,10 +142,13 @@ osdBearerToken
140142 = lens _osdBearerToken
141143 (\ s a -> s{_osdBearerToken = a})
142144
143−-- | Required. The resource name of the sink to delete, including the parent
144−-- resource and the sink identifier. Example:
145−-- \`\"projects\/my-project-id\/sinks\/my-sink-id\"\`. It is an error if
146−-- the sink does not exist.
145+-- | Required. The full resource name of the sink to delete, including the
146+-- parent resource and the sink identifier:
147+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
148+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" It is an error if
149+-- the sink does not exist. Example:
150+-- \"projects\/my-project-id\/sinks\/my-sink-id\". It is an error if the
151+-- sink does not exist.
147152osdSinkName :: Lens' OrganizationsSinksDelete Text
148153osdSinkName
149154 = lens _osdSinkName (\ s a -> s{_osdSinkName = a})
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Get.hs+4−2
@@ -140,8 +140,10 @@ osgBearerToken
140140 = lens _osgBearerToken
141141 (\ s a -> s{_osgBearerToken = a})
142142
143−-- | Required. The resource name of the sink to return. Example:
144−-- \`\"projects\/my-project-id\/sinks\/my-sink-id\"\`.
143+-- | Required. The parent resource name of the sink:
144+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
145+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
146+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
145147osgSinkName :: Lens' OrganizationsSinksGet Text
146148osgSinkName
147149 = lens _osgSinkName (\ s a -> s{_osgSinkName = a})
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/List.hs+6−6
@@ -122,8 +122,8 @@ organizationsSinksList pOslParent_ =
122122 , _oslCallback = Nothing
123123 }
124124
125−-- | Required. The cloud resource containing the sinks. Example:
126−-- \`\"projects\/my-logging-project\"\`.
125+-- | Required. The parent resource whose sinks are to be listed. Examples:
126+-- \"projects\/my-logging-project\", \"organizations\/123456789\".
127127oslParent :: Lens' OrganizationsSinksList Text
128128oslParent
129129 = lens _oslParent (\ s a -> s{_oslParent = a})
@@ -161,16 +161,16 @@ oslBearerToken
161161 (\ s a -> s{_oslBearerToken = a})
162162
163163-- | Optional. If present, then retrieve the next batch of results from the
164−-- preceding call to this method. \`pageToken\` must be the value of
165−-- \`nextPageToken\` from the previous response. The values of other method
164+-- preceding call to this method. pageToken must be the value of
165+-- nextPageToken from the previous response. The values of other method
166166-- parameters should be identical to those in the previous call.
167167oslPageToken :: Lens' OrganizationsSinksList (Maybe Text)
168168oslPageToken
169169 = lens _oslPageToken (\ s a -> s{_oslPageToken = a})
170170
171171-- | Optional. The maximum number of results to return from this request.
172−-- Non-positive values are ignored. The presence of \`nextPageToken\` in
173−-- the response indicates that more results might be available.
172+-- Non-positive values are ignored. The presence of nextPageToken in the
173+-- response indicates that more results might be available.
174174oslPageSize :: Lens' OrganizationsSinksList (Maybe Int32)
175175oslPageSize
176176 = lens _oslPageSize (\ s a -> s{_oslPageSize = a}) .
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Sinks/Update.hs+56−25
@@ -20,7 +20,12 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Updates or creates a sink.
23+-- Updates a sink. If the named sink doesn\'t exist, then this method is
24+-- identical to sinks.create. If the named sink does exist, then this
25+-- method replaces the following fields in the existing sink with values
26+-- from the new sink: destination, filter, output_version_format,
27+-- start_time, and end_time. The updated filter might also have a new
28+-- writer_identity; see the unique_writer_identity field.
2429--
2530-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.organizations.sinks.update@.
2631module Network.Google.Resource.Logging.Organizations.Sinks.Update
@@ -34,6 +39,7 @@ module Network.Google.Resource.Logging.Organizations.Sinks.Update
3439
3540 -- * Request Lenses
3641 , osuXgafv
42+ , osuUniqueWriterIdentity
3743 , osuUploadProtocol
3844 , osuPp
3945 , osuAccessToken
@@ -53,28 +59,35 @@ type OrganizationsSinksUpdateResource =
5359 "v2" :>
5460 Capture "sinkName" Text :>
5561 QueryParam "$.xgafv" Xgafv :>
56− QueryParam "upload_protocol" Text :>
57− QueryParam "pp" Bool :>
58− QueryParam "access_token" Text :>
59− QueryParam "uploadType" Text :>
60− QueryParam "bearer_token" Text :>
61− QueryParam "callback" Text :>
62− QueryParam "alt" AltJSON :>
63− ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
64−
65−-- | Updates or creates a sink.
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
71+
72+-- | Updates a sink. If the named sink doesn\'t exist, then this method is
73+-- identical to sinks.create. If the named sink does exist, then this
74+-- method replaces the following fields in the existing sink with values
75+-- from the new sink: destination, filter, output_version_format,
76+-- start_time, and end_time. The updated filter might also have a new
77+-- writer_identity; see the unique_writer_identity field.
6678--
6779-- /See:/ 'organizationsSinksUpdate' smart constructor.
6880data OrganizationsSinksUpdate = OrganizationsSinksUpdate'
69− { _osuXgafv :: !(Maybe Xgafv)
70− , _osuUploadProtocol :: !(Maybe Text)
71− , _osuPp :: !Bool
72− , _osuAccessToken :: !(Maybe Text)
73− , _osuUploadType :: !(Maybe Text)
74− , _osuPayload :: !LogSink
75− , _osuBearerToken :: !(Maybe Text)
76− , _osuSinkName :: !Text
77− , _osuCallback :: !(Maybe Text)
81+ { _osuXgafv :: !(Maybe Xgafv)
82+ , _osuUniqueWriterIdentity :: !(Maybe Bool)
83+ , _osuUploadProtocol :: !(Maybe Text)
84+ , _osuPp :: !Bool
85+ , _osuAccessToken :: !(Maybe Text)
86+ , _osuUploadType :: !(Maybe Text)
87+ , _osuPayload :: !LogSink
88+ , _osuBearerToken :: !(Maybe Text)
89+ , _osuSinkName :: !Text
90+ , _osuCallback :: !(Maybe Text)
7891 } deriving (Eq,Show,Data,Typeable,Generic)
7992
8093-- | Creates a value of 'OrganizationsSinksUpdate' with the minimum fields required to make a request.
@@ -83,6 +96,8 @@ data OrganizationsSinksUpdate = OrganizationsSinksUpdate'
8396--
8497-- * 'osuXgafv'
8598--
99+-- * 'osuUniqueWriterIdentity'
100+--
86101-- * 'osuUploadProtocol'
87102--
88103-- * 'osuPp'
@@ -105,6 +120,7 @@ organizationsSinksUpdate
105120organizationsSinksUpdate pOsuPayload_ pOsuSinkName_ =
106121 OrganizationsSinksUpdate'
107122 { _osuXgafv = Nothing
123+ , _osuUniqueWriterIdentity = Nothing
108124 , _osuUploadProtocol = Nothing
109125 , _osuPp = True
110126 , _osuAccessToken = Nothing
@@ -119,6 +135,19 @@ organizationsSinksUpdate pOsuPayload_ pOsuSinkName_ =
119135osuXgafv :: Lens' OrganizationsSinksUpdate (Maybe Xgafv)
120136osuXgafv = lens _osuXgafv (\ s a -> s{_osuXgafv = a})
121137
138+-- | Optional. See sinks.create for a description of this field. When
139+-- updating a sink, the effect of this field on the value of
140+-- writer_identity in the updated sink depends on both the old and new
141+-- values of this field: If the old and new values of this field are both
142+-- false or both true, then there is no change to the sink\'s
143+-- writer_identity. If the old value was false and the new value is true,
144+-- then writer_identity is changed to a unique service account. It is an
145+-- error if the old value was true and the new value is false.
146+osuUniqueWriterIdentity :: Lens' OrganizationsSinksUpdate (Maybe Bool)
147+osuUniqueWriterIdentity
148+ = lens _osuUniqueWriterIdentity
149+ (\ s a -> s{_osuUniqueWriterIdentity = a})
150+
122151-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123152osuUploadProtocol :: Lens' OrganizationsSinksUpdate (Maybe Text)
124153osuUploadProtocol
@@ -152,10 +181,11 @@ osuBearerToken
152181 = lens _osuBearerToken
153182 (\ s a -> s{_osuBearerToken = a})
154183
155−-- | Required. The resource name of the sink to update, including the parent
156−-- resource and the sink identifier. If the sink does not exist, this
157−-- method creates the sink. Example:
158−-- \`\"projects\/my-project-id\/sinks\/my-sink-id\"\`.
184+-- | Required. The full resource name of the sink to update, including the
185+-- parent resource and the sink identifier:
186+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
187+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
188+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
159189osuSinkName :: Lens' OrganizationsSinksUpdate Text
160190osuSinkName
161191 = lens _osuSinkName (\ s a -> s{_osuSinkName = a})
@@ -171,7 +201,8 @@ instance GoogleRequest OrganizationsSinksUpdate where
171201 '["https://www.googleapis.com/auth/cloud-platform",
172202 "https://www.googleapis.com/auth/logging.admin"]
173203 requestClient OrganizationsSinksUpdate'{..}
174− = go _osuSinkName _osuXgafv _osuUploadProtocol
204+ = go _osuSinkName _osuXgafv _osuUniqueWriterIdentity
205+ _osuUploadProtocol
175206 (Just _osuPp)
176207 _osuAccessToken
177208 _osuUploadType
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/Delete.hs+10−6
@@ -20,8 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Deletes a log and all its log entries. The log will reappear if it
24−-- receives new entries.
23+-- Deletes all the log entries in a log. The log reappears if it receives
24+-- new entries.
2525--
2626-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.projects.logs.delete@.
2727module Network.Google.Resource.Logging.Projects.Logs.Delete
@@ -61,8 +61,8 @@ type ProjectsLogsDeleteResource =
6161 QueryParam "callback" Text :>
6262 QueryParam "alt" AltJSON :> Delete '[JSON] Empty
6363
64−-- | Deletes a log and all its log entries. The log will reappear if it
65−-- receives new entries.
64+-- | Deletes all the log entries in a log. The log reappears if it receives
65+-- new entries.
6666--
6767-- /See:/ 'projectsLogsDelete' smart constructor.
6868data ProjectsLogsDelete = ProjectsLogsDelete'
@@ -142,8 +142,12 @@ pldBearerToken
142142 = lens _pldBearerToken
143143 (\ s a -> s{_pldBearerToken = a})
144144
145−-- | Required. The resource name of the log to delete. Example:
146−-- \`\"projects\/my-project\/logs\/syslog\"\`.
145+-- | Required. The resource name of the log to delete:
146+-- \"projects\/[PROJECT_ID]\/logs\/[LOG_ID]\"
147+-- \"organizations\/[ORGANIZATION_ID]\/logs\/[LOG_ID]\" [LOG_ID] must be
148+-- URL-encoded. For example, \"projects\/my-project-id\/logs\/syslog\",
149+-- \"organizations\/1234567890\/logs\/cloudresourcemanager.googleapis.com%2Factivity\".
150+-- For more information about log names, see LogEntry.
147151pldLogName :: Lens' ProjectsLogsDelete Text
148152pldLogName
149153 = lens _pldLogName (\ s a -> s{_pldLogName = a})
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Logs/List.hsnew file+207
@@ -0,0 +1,207 @@
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 #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Logging.Projects.Logs.List
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)
22+--
23+-- Lists the logs in projects or organizations. Only logs that have entries
24+-- are listed.
25+--
26+-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.projects.logs.list@.
27+module Network.Google.Resource.Logging.Projects.Logs.List
28+ (
29+ -- * REST Resource
30+ ProjectsLogsListResource
31+
32+ -- * Creating a Request
33+ , projectsLogsList
34+ , ProjectsLogsList
35+
36+ -- * Request Lenses
37+ , pllParent
38+ , pllXgafv
39+ , pllUploadProtocol
40+ , pllPp
41+ , pllAccessToken
42+ , pllUploadType
43+ , pllBearerToken
44+ , pllPageToken
45+ , pllPageSize
46+ , pllCallback
47+ ) where
48+
49+import Network.Google.Logging.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @logging.projects.logs.list@ method which the
53+-- 'ProjectsLogsList' request conforms to.
54+type ProjectsLogsListResource =
55+ "v2" :>
56+ Capture "parent" Text :>
57+ "logs" :>
58+ QueryParam "$.xgafv" Xgafv :>
59+ QueryParam "upload_protocol" Text :>
60+ QueryParam "pp" Bool :>
61+ QueryParam "access_token" Text :>
62+ QueryParam "uploadType" Text :>
63+ QueryParam "bearer_token" Text :>
64+ QueryParam "pageToken" Text :>
65+ QueryParam "pageSize" (Textual Int32) :>
66+ QueryParam "callback" Text :>
67+ QueryParam "alt" AltJSON :>
68+ Get '[JSON] ListLogsResponse
69+
70+-- | Lists the logs in projects or organizations. Only logs that have entries
71+-- are listed.
72+--
73+-- /See:/ 'projectsLogsList' smart constructor.
74+data ProjectsLogsList = ProjectsLogsList'
75+ { _pllParent :: !Text
76+ , _pllXgafv :: !(Maybe Xgafv)
77+ , _pllUploadProtocol :: !(Maybe Text)
78+ , _pllPp :: !Bool
79+ , _pllAccessToken :: !(Maybe Text)
80+ , _pllUploadType :: !(Maybe Text)
81+ , _pllBearerToken :: !(Maybe Text)
82+ , _pllPageToken :: !(Maybe Text)
83+ , _pllPageSize :: !(Maybe (Textual Int32))
84+ , _pllCallback :: !(Maybe Text)
85+ } deriving (Eq,Show,Data,Typeable,Generic)
86+
87+-- | Creates a value of 'ProjectsLogsList' with the minimum fields required to make a request.
88+--
89+-- Use one of the following lenses to modify other fields as desired:
90+--
91+-- * 'pllParent'
92+--
93+-- * 'pllXgafv'
94+--
95+-- * 'pllUploadProtocol'
96+--
97+-- * 'pllPp'
98+--
99+-- * 'pllAccessToken'
100+--
101+-- * 'pllUploadType'
102+--
103+-- * 'pllBearerToken'
104+--
105+-- * 'pllPageToken'
106+--
107+-- * 'pllPageSize'
108+--
109+-- * 'pllCallback'
110+projectsLogsList
111+ :: Text -- ^ 'pllParent'
112+ -> ProjectsLogsList
113+projectsLogsList pPllParent_ =
114+ ProjectsLogsList'
115+ { _pllParent = pPllParent_
116+ , _pllXgafv = Nothing
117+ , _pllUploadProtocol = Nothing
118+ , _pllPp = True
119+ , _pllAccessToken = Nothing
120+ , _pllUploadType = Nothing
121+ , _pllBearerToken = Nothing
122+ , _pllPageToken = Nothing
123+ , _pllPageSize = Nothing
124+ , _pllCallback = Nothing
125+ }
126+
127+-- | Required. The resource name that owns the logs:
128+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
129+pllParent :: Lens' ProjectsLogsList Text
130+pllParent
131+ = lens _pllParent (\ s a -> s{_pllParent = a})
132+
133+-- | V1 error format.
134+pllXgafv :: Lens' ProjectsLogsList (Maybe Xgafv)
135+pllXgafv = lens _pllXgafv (\ s a -> s{_pllXgafv = a})
136+
137+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
138+pllUploadProtocol :: Lens' ProjectsLogsList (Maybe Text)
139+pllUploadProtocol
140+ = lens _pllUploadProtocol
141+ (\ s a -> s{_pllUploadProtocol = a})
142+
143+-- | Pretty-print response.
144+pllPp :: Lens' ProjectsLogsList Bool
145+pllPp = lens _pllPp (\ s a -> s{_pllPp = a})
146+
147+-- | OAuth access token.
148+pllAccessToken :: Lens' ProjectsLogsList (Maybe Text)
149+pllAccessToken
150+ = lens _pllAccessToken
151+ (\ s a -> s{_pllAccessToken = a})
152+
153+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
154+pllUploadType :: Lens' ProjectsLogsList (Maybe Text)
155+pllUploadType
156+ = lens _pllUploadType
157+ (\ s a -> s{_pllUploadType = a})
158+
159+-- | OAuth bearer token.
160+pllBearerToken :: Lens' ProjectsLogsList (Maybe Text)
161+pllBearerToken
162+ = lens _pllBearerToken
163+ (\ s a -> s{_pllBearerToken = a})
164+
165+-- | Optional. If present, then retrieve the next batch of results from the
166+-- preceding call to this method. pageToken must be the value of
167+-- nextPageToken from the previous response. The values of other method
168+-- parameters should be identical to those in the previous call.
169+pllPageToken :: Lens' ProjectsLogsList (Maybe Text)
170+pllPageToken
171+ = lens _pllPageToken (\ s a -> s{_pllPageToken = a})
172+
173+-- | Optional. The maximum number of results to return from this request.
174+-- Non-positive values are ignored. The presence of nextPageToken in the
175+-- response indicates that more results might be available.
176+pllPageSize :: Lens' ProjectsLogsList (Maybe Int32)
177+pllPageSize
178+ = lens _pllPageSize (\ s a -> s{_pllPageSize = a}) .
179+ mapping _Coerce
180+
181+-- | JSONP
182+pllCallback :: Lens' ProjectsLogsList (Maybe Text)
183+pllCallback
184+ = lens _pllCallback (\ s a -> s{_pllCallback = a})
185+
186+instance GoogleRequest ProjectsLogsList where
187+ type Rs ProjectsLogsList = ListLogsResponse
188+ type Scopes ProjectsLogsList =
189+ '["https://www.googleapis.com/auth/cloud-platform",
190+ "https://www.googleapis.com/auth/cloud-platform.read-only",
191+ "https://www.googleapis.com/auth/logging.admin",
192+ "https://www.googleapis.com/auth/logging.read"]
193+ requestClient ProjectsLogsList'{..}
194+ = go _pllParent _pllXgafv _pllUploadProtocol
195+ (Just _pllPp)
196+ _pllAccessToken
197+ _pllUploadType
198+ _pllBearerToken
199+ _pllPageToken
200+ _pllPageSize
201+ _pllCallback
202+ (Just AltJSON)
203+ loggingService
204+ where go
205+ = buildClient
206+ (Proxy :: Proxy ProjectsLogsListResource)
207+ mempty
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Create.hs+2−2
@@ -116,8 +116,8 @@ projectsMetricsCreate pPmcParent_ pPmcPayload_ =
116116 , _pmcCallback = Nothing
117117 }
118118
119−-- | The resource name of the project in which to create the metric. Example:
120−-- \`\"projects\/my-project-id\"\`. The new metric must be provided in the
119+-- | The resource name of the project in which to create the metric:
120+-- \"projects\/[PROJECT_ID]\" The new metric must be provided in the
121121-- request.
122122pmcParent :: Lens' ProjectsMetricsCreate Text
123123pmcParent
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Delete.hs+2−2
@@ -128,8 +128,8 @@ pmdAccessToken
128128 = lens _pmdAccessToken
129129 (\ s a -> s{_pmdAccessToken = a})
130130
131−-- | The resource name of the metric to delete. Example:
132−-- \`\"projects\/my-project-id\/metrics\/my-metric-id\"\`.
131+-- | The resource name of the metric to delete:
132+-- \"projects\/[PROJECT_ID]\/metrics\/[METRIC_ID]\"
133133pmdMetricName :: Lens' ProjectsMetricsDelete Text
134134pmdMetricName
135135 = lens _pmdMetricName
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Get.hs+2−2
@@ -128,8 +128,8 @@ pmgAccessToken
128128 = lens _pmgAccessToken
129129 (\ s a -> s{_pmgAccessToken = a})
130130
131−-- | The resource name of the desired metric. Example:
132−-- \`\"projects\/my-project-id\/metrics\/my-metric-id\"\`.
131+-- | The resource name of the desired metric:
132+-- \"projects\/[PROJECT_ID]\/metrics\/[METRIC_ID]\"
133133pmgMetricName :: Lens' ProjectsMetricsGet Text
134134pmgMetricName
135135 = lens _pmgMetricName
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/List.hs+6−6
@@ -122,8 +122,8 @@ projectsMetricsList pPmlParent_ =
122122 , _pmlCallback = Nothing
123123 }
124124
125−-- | Required. The resource name containing the metrics. Example:
126−-- \`\"projects\/my-project-id\"\`.
125+-- | Required. The name of the project containing the metrics:
126+-- \"projects\/[PROJECT_ID]\"
127127pmlParent :: Lens' ProjectsMetricsList Text
128128pmlParent
129129 = lens _pmlParent (\ s a -> s{_pmlParent = a})
@@ -161,16 +161,16 @@ pmlBearerToken
161161 (\ s a -> s{_pmlBearerToken = a})
162162
163163-- | Optional. If present, then retrieve the next batch of results from the
164−-- preceding call to this method. \`pageToken\` must be the value of
165−-- \`nextPageToken\` from the previous response. The values of other method
164+-- preceding call to this method. pageToken must be the value of
165+-- nextPageToken from the previous response. The values of other method
166166-- parameters should be identical to those in the previous call.
167167pmlPageToken :: Lens' ProjectsMetricsList (Maybe Text)
168168pmlPageToken
169169 = lens _pmlPageToken (\ s a -> s{_pmlPageToken = a})
170170
171171-- | Optional. The maximum number of results to return from this request.
172−-- Non-positive values are ignored. The presence of \`nextPageToken\` in
173−-- the response indicates that more results might be available.
172+-- Non-positive values are ignored. The presence of nextPageToken in the
173+-- response indicates that more results might be available.
174174pmlPageSize :: Lens' ProjectsMetricsList (Maybe Int32)
175175pmlPageSize
176176 = lens _pmlPageSize (\ s a -> s{_pmlPageSize = a}) .
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Metrics/Update.hs+5−5
@@ -135,11 +135,11 @@ pmuAccessToken
135135 = lens _pmuAccessToken
136136 (\ s a -> s{_pmuAccessToken = a})
137137
138−-- | The resource name of the metric to update. Example:
139−-- \`\"projects\/my-project-id\/metrics\/my-metric-id\"\`. The updated
140−-- metric must be provided in the request and have the same identifier that
141−-- is specified in \`metricName\`. If the metric does not exist, it is
142−-- created.
138+-- | The resource name of the metric to update:
139+-- \"projects\/[PROJECT_ID]\/metrics\/[METRIC_ID]\" The updated metric must
140+-- be provided in the request and it\'s name field must be the same as
141+-- [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a new
142+-- metric is created.
143143pmuMetricName :: Lens' ProjectsMetricsUpdate Text
144144pmuMetricName
145145 = lens _pmuMetricName
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Create.hs+55−24
@@ -20,7 +20,11 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Creates a sink.
23+-- Creates a sink that exports specified log entries to a destination. The
24+-- export of newly-ingested log entries begins immediately, unless the
25+-- current time is outside the sink\'s start and end times or the sink\'s
26+-- writer_identity is not permitted to write to the destination. A sink can
27+-- export log entries only from the resource owning the sink.
2428--
2529-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.projects.sinks.create@.
2630module Network.Google.Resource.Logging.Projects.Sinks.Create
@@ -35,6 +39,7 @@ module Network.Google.Resource.Logging.Projects.Sinks.Create
3539 -- * Request Lenses
3640 , pscParent
3741 , pscXgafv
42+ , pscUniqueWriterIdentity
3843 , pscUploadProtocol
3944 , pscPp
4045 , pscAccessToken
@@ -54,28 +59,34 @@ type ProjectsSinksCreateResource =
5459 Capture "parent" Text :>
5560 "sinks" :>
5661 QueryParam "$.xgafv" Xgafv :>
57− QueryParam "upload_protocol" Text :>
58− QueryParam "pp" Bool :>
59− QueryParam "access_token" Text :>
60− QueryParam "uploadType" Text :>
61− QueryParam "bearer_token" Text :>
62− QueryParam "callback" Text :>
63− QueryParam "alt" AltJSON :>
64− ReqBody '[JSON] LogSink :> Post '[JSON] LogSink
65−
66−-- | Creates a sink.
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Post '[JSON] LogSink
71+
72+-- | Creates a sink that exports specified log entries to a destination. The
73+-- export of newly-ingested log entries begins immediately, unless the
74+-- current time is outside the sink\'s start and end times or the sink\'s
75+-- writer_identity is not permitted to write to the destination. A sink can
76+-- export log entries only from the resource owning the sink.
6777--
6878-- /See:/ 'projectsSinksCreate' smart constructor.
6979data ProjectsSinksCreate = ProjectsSinksCreate'
70− { _pscParent :: !Text
71− , _pscXgafv :: !(Maybe Xgafv)
72− , _pscUploadProtocol :: !(Maybe Text)
73− , _pscPp :: !Bool
74− , _pscAccessToken :: !(Maybe Text)
75− , _pscUploadType :: !(Maybe Text)
76− , _pscPayload :: !LogSink
77− , _pscBearerToken :: !(Maybe Text)
78− , _pscCallback :: !(Maybe Text)
80+ { _pscParent :: !Text
81+ , _pscXgafv :: !(Maybe Xgafv)
82+ , _pscUniqueWriterIdentity :: !(Maybe Bool)
83+ , _pscUploadProtocol :: !(Maybe Text)
84+ , _pscPp :: !Bool
85+ , _pscAccessToken :: !(Maybe Text)
86+ , _pscUploadType :: !(Maybe Text)
87+ , _pscPayload :: !LogSink
88+ , _pscBearerToken :: !(Maybe Text)
89+ , _pscCallback :: !(Maybe Text)
7990 } deriving (Eq,Show,Data,Typeable,Generic)
8091
8192-- | Creates a value of 'ProjectsSinksCreate' with the minimum fields required to make a request.
@@ -86,6 +97,8 @@ data ProjectsSinksCreate = ProjectsSinksCreate'
8697--
8798-- * 'pscXgafv'
8899--
100+-- * 'pscUniqueWriterIdentity'
101+--
89102-- * 'pscUploadProtocol'
90103--
91104-- * 'pscPp'
@@ -107,6 +120,7 @@ projectsSinksCreate pPscParent_ pPscPayload_ =
107120 ProjectsSinksCreate'
108121 { _pscParent = pPscParent_
109122 , _pscXgafv = Nothing
123+ , _pscUniqueWriterIdentity = Nothing
110124 , _pscUploadProtocol = Nothing
111125 , _pscPp = True
112126 , _pscAccessToken = Nothing
@@ -116,9 +130,10 @@ projectsSinksCreate pPscParent_ pPscPayload_ =
116130 , _pscCallback = Nothing
117131 }
118132
119−-- | Required. The resource in which to create the sink. Example:
120−-- \`\"projects\/my-project-id\"\`. The new sink must be provided in the
121−-- request.
133+-- | Required. The resource in which to create the sink:
134+-- \"projects\/[PROJECT_ID]\" \"organizations\/[ORGANIZATION_ID]\"
135+-- Examples: \"projects\/my-logging-project\",
136+-- \"organizations\/123456789\".
122137pscParent :: Lens' ProjectsSinksCreate Text
123138pscParent
124139 = lens _pscParent (\ s a -> s{_pscParent = a})
@@ -127,6 +142,21 @@ pscParent
127142pscXgafv :: Lens' ProjectsSinksCreate (Maybe Xgafv)
128143pscXgafv = lens _pscXgafv (\ s a -> s{_pscXgafv = a})
129144
145+-- | Optional. Determines the kind of IAM identity returned as
146+-- writer_identity in the new sink. If this value is omitted or set to
147+-- false, and if the sink\'s parent is a project, then the value returned
148+-- as writer_identity is cloud-logs\'google.com, the same identity used
149+-- before the addition of writer identities to this API. The sink\'s
150+-- destination must be in the same project as the sink itself.If this field
151+-- is set to true, or if the sink is owned by a non-project resource such
152+-- as an organization, then the value of writer_identity will be a unique
153+-- service account used only for exports from the new sink. For more
154+-- information, see writer_identity in LogSink.
155+pscUniqueWriterIdentity :: Lens' ProjectsSinksCreate (Maybe Bool)
156+pscUniqueWriterIdentity
157+ = lens _pscUniqueWriterIdentity
158+ (\ s a -> s{_pscUniqueWriterIdentity = a})
159+
130160-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
131161pscUploadProtocol :: Lens' ProjectsSinksCreate (Maybe Text)
132162pscUploadProtocol
@@ -171,7 +201,8 @@ instance GoogleRequest ProjectsSinksCreate where
171201 '["https://www.googleapis.com/auth/cloud-platform",
172202 "https://www.googleapis.com/auth/logging.admin"]
173203 requestClient ProjectsSinksCreate'{..}
174− = go _pscParent _pscXgafv _pscUploadProtocol
204+ = go _pscParent _pscXgafv _pscUniqueWriterIdentity
205+ _pscUploadProtocol
175206 (Just _pscPp)
176207 _pscAccessToken
177208 _pscUploadType
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Delete.hs+11−6
@@ -20,7 +20,8 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Deletes a sink.
23+-- Deletes a sink. If the sink has a unique writer_identity, then that
24+-- service account is also deleted.
2425--
2526-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.projects.sinks.delete@.
2627module Network.Google.Resource.Logging.Projects.Sinks.Delete
@@ -60,7 +61,8 @@ type ProjectsSinksDeleteResource =
6061 QueryParam "callback" Text :>
6162 QueryParam "alt" AltJSON :> Delete '[JSON] Empty
6263
63−-- | Deletes a sink.
64+-- | Deletes a sink. If the sink has a unique writer_identity, then that
65+-- service account is also deleted.
6466--
6567-- /See:/ 'projectsSinksDelete' smart constructor.
6668data ProjectsSinksDelete = ProjectsSinksDelete'
@@ -140,10 +142,13 @@ psdBearerToken
140142 = lens _psdBearerToken
141143 (\ s a -> s{_psdBearerToken = a})
142144
143−-- | Required. The resource name of the sink to delete, including the parent
144−-- resource and the sink identifier. Example:
145−-- \`\"projects\/my-project-id\/sinks\/my-sink-id\"\`. It is an error if
146−-- the sink does not exist.
145+-- | Required. The full resource name of the sink to delete, including the
146+-- parent resource and the sink identifier:
147+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
148+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" It is an error if
149+-- the sink does not exist. Example:
150+-- \"projects\/my-project-id\/sinks\/my-sink-id\". It is an error if the
151+-- sink does not exist.
147152psdSinkName :: Lens' ProjectsSinksDelete Text
148153psdSinkName
149154 = lens _psdSinkName (\ s a -> s{_psdSinkName = a})
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Get.hs+4−2
@@ -140,8 +140,10 @@ psgBearerToken
140140 = lens _psgBearerToken
141141 (\ s a -> s{_psgBearerToken = a})
142142
143−-- | Required. The resource name of the sink to return. Example:
144−-- \`\"projects\/my-project-id\/sinks\/my-sink-id\"\`.
143+-- | Required. The parent resource name of the sink:
144+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
145+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
146+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
145147psgSinkName :: Lens' ProjectsSinksGet Text
146148psgSinkName
147149 = lens _psgSinkName (\ s a -> s{_psgSinkName = a})
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/List.hs+6−6
@@ -122,8 +122,8 @@ projectsSinksList pPslParent_ =
122122 , _pslCallback = Nothing
123123 }
124124
125−-- | Required. The cloud resource containing the sinks. Example:
126−-- \`\"projects\/my-logging-project\"\`.
125+-- | Required. The parent resource whose sinks are to be listed. Examples:
126+-- \"projects\/my-logging-project\", \"organizations\/123456789\".
127127pslParent :: Lens' ProjectsSinksList Text
128128pslParent
129129 = lens _pslParent (\ s a -> s{_pslParent = a})
@@ -161,16 +161,16 @@ pslBearerToken
161161 (\ s a -> s{_pslBearerToken = a})
162162
163163-- | Optional. If present, then retrieve the next batch of results from the
164−-- preceding call to this method. \`pageToken\` must be the value of
165−-- \`nextPageToken\` from the previous response. The values of other method
164+-- preceding call to this method. pageToken must be the value of
165+-- nextPageToken from the previous response. The values of other method
166166-- parameters should be identical to those in the previous call.
167167pslPageToken :: Lens' ProjectsSinksList (Maybe Text)
168168pslPageToken
169169 = lens _pslPageToken (\ s a -> s{_pslPageToken = a})
170170
171171-- | Optional. The maximum number of results to return from this request.
172−-- Non-positive values are ignored. The presence of \`nextPageToken\` in
173−-- the response indicates that more results might be available.
172+-- Non-positive values are ignored. The presence of nextPageToken in the
173+-- response indicates that more results might be available.
174174pslPageSize :: Lens' ProjectsSinksList (Maybe Int32)
175175pslPageSize
176176 = lens _pslPageSize (\ s a -> s{_pslPageSize = a}) .
gogol-logging/gen/Network/Google/Resource/Logging/Projects/Sinks/Update.hs+56−25
@@ -20,7 +20,12 @@
2020-- Stability : auto-generated
2121-- Portability : non-portable (GHC extensions)
2222--
23−-- Updates or creates a sink.
23+-- Updates a sink. If the named sink doesn\'t exist, then this method is
24+-- identical to sinks.create. If the named sink does exist, then this
25+-- method replaces the following fields in the existing sink with values
26+-- from the new sink: destination, filter, output_version_format,
27+-- start_time, and end_time. The updated filter might also have a new
28+-- writer_identity; see the unique_writer_identity field.
2429--
2530-- /See:/ <https://cloud.google.com/logging/docs/ Stackdriver Logging API Reference> for @logging.projects.sinks.update@.
2631module Network.Google.Resource.Logging.Projects.Sinks.Update
@@ -34,6 +39,7 @@ module Network.Google.Resource.Logging.Projects.Sinks.Update
3439
3540 -- * Request Lenses
3641 , psuXgafv
42+ , psuUniqueWriterIdentity
3743 , psuUploadProtocol
3844 , psuPp
3945 , psuAccessToken
@@ -53,28 +59,35 @@ type ProjectsSinksUpdateResource =
5359 "v2" :>
5460 Capture "sinkName" Text :>
5561 QueryParam "$.xgafv" Xgafv :>
56− QueryParam "upload_protocol" Text :>
57− QueryParam "pp" Bool :>
58− QueryParam "access_token" Text :>
59− QueryParam "uploadType" Text :>
60− QueryParam "bearer_token" Text :>
61− QueryParam "callback" Text :>
62− QueryParam "alt" AltJSON :>
63− ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
64−
65−-- | Updates or creates a sink.
62+ QueryParam "uniqueWriterIdentity" Bool :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] LogSink :> Put '[JSON] LogSink
71+
72+-- | Updates a sink. If the named sink doesn\'t exist, then this method is
73+-- identical to sinks.create. If the named sink does exist, then this
74+-- method replaces the following fields in the existing sink with values
75+-- from the new sink: destination, filter, output_version_format,
76+-- start_time, and end_time. The updated filter might also have a new
77+-- writer_identity; see the unique_writer_identity field.
6678--
6779-- /See:/ 'projectsSinksUpdate' smart constructor.
6880data ProjectsSinksUpdate = ProjectsSinksUpdate'
69− { _psuXgafv :: !(Maybe Xgafv)
70− , _psuUploadProtocol :: !(Maybe Text)
71− , _psuPp :: !Bool
72− , _psuAccessToken :: !(Maybe Text)
73− , _psuUploadType :: !(Maybe Text)
74− , _psuPayload :: !LogSink
75− , _psuBearerToken :: !(Maybe Text)
76− , _psuSinkName :: !Text
77− , _psuCallback :: !(Maybe Text)
81+ { _psuXgafv :: !(Maybe Xgafv)
82+ , _psuUniqueWriterIdentity :: !(Maybe Bool)
83+ , _psuUploadProtocol :: !(Maybe Text)
84+ , _psuPp :: !Bool
85+ , _psuAccessToken :: !(Maybe Text)
86+ , _psuUploadType :: !(Maybe Text)
87+ , _psuPayload :: !LogSink
88+ , _psuBearerToken :: !(Maybe Text)
89+ , _psuSinkName :: !Text
90+ , _psuCallback :: !(Maybe Text)
7891 } deriving (Eq,Show,Data,Typeable,Generic)
7992
8093-- | Creates a value of 'ProjectsSinksUpdate' with the minimum fields required to make a request.
@@ -83,6 +96,8 @@ data ProjectsSinksUpdate = ProjectsSinksUpdate'
8396--
8497-- * 'psuXgafv'
8598--
99+-- * 'psuUniqueWriterIdentity'
100+--
86101-- * 'psuUploadProtocol'
87102--
88103-- * 'psuPp'
@@ -105,6 +120,7 @@ projectsSinksUpdate
105120projectsSinksUpdate pPsuPayload_ pPsuSinkName_ =
106121 ProjectsSinksUpdate'
107122 { _psuXgafv = Nothing
123+ , _psuUniqueWriterIdentity = Nothing
108124 , _psuUploadProtocol = Nothing
109125 , _psuPp = True
110126 , _psuAccessToken = Nothing
@@ -119,6 +135,19 @@ projectsSinksUpdate pPsuPayload_ pPsuSinkName_ =
119135psuXgafv :: Lens' ProjectsSinksUpdate (Maybe Xgafv)
120136psuXgafv = lens _psuXgafv (\ s a -> s{_psuXgafv = a})
121137
138+-- | Optional. See sinks.create for a description of this field. When
139+-- updating a sink, the effect of this field on the value of
140+-- writer_identity in the updated sink depends on both the old and new
141+-- values of this field: If the old and new values of this field are both
142+-- false or both true, then there is no change to the sink\'s
143+-- writer_identity. If the old value was false and the new value is true,
144+-- then writer_identity is changed to a unique service account. It is an
145+-- error if the old value was true and the new value is false.
146+psuUniqueWriterIdentity :: Lens' ProjectsSinksUpdate (Maybe Bool)
147+psuUniqueWriterIdentity
148+ = lens _psuUniqueWriterIdentity
149+ (\ s a -> s{_psuUniqueWriterIdentity = a})
150+
122151-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
123152psuUploadProtocol :: Lens' ProjectsSinksUpdate (Maybe Text)
124153psuUploadProtocol
@@ -152,10 +181,11 @@ psuBearerToken
152181 = lens _psuBearerToken
153182 (\ s a -> s{_psuBearerToken = a})
154183
155−-- | Required. The resource name of the sink to update, including the parent
156−-- resource and the sink identifier. If the sink does not exist, this
157−-- method creates the sink. Example:
158−-- \`\"projects\/my-project-id\/sinks\/my-sink-id\"\`.
184+-- | Required. The full resource name of the sink to update, including the
185+-- parent resource and the sink identifier:
186+-- \"projects\/[PROJECT_ID]\/sinks\/[SINK_ID]\"
187+-- \"organizations\/[ORGANIZATION_ID]\/sinks\/[SINK_ID]\" Example:
188+-- \"projects\/my-project-id\/sinks\/my-sink-id\".
159189psuSinkName :: Lens' ProjectsSinksUpdate Text
160190psuSinkName
161191 = lens _psuSinkName (\ s a -> s{_psuSinkName = a})
@@ -171,7 +201,8 @@ instance GoogleRequest ProjectsSinksUpdate where
171201 '["https://www.googleapis.com/auth/cloud-platform",
172202 "https://www.googleapis.com/auth/logging.admin"]
173203 requestClient ProjectsSinksUpdate'{..}
174− = go _psuSinkName _psuXgafv _psuUploadProtocol
204+ = go _psuSinkName _psuXgafv _psuUniqueWriterIdentity
205+ _psuUploadProtocol
175206 (Just _psuPp)
176207 _psuAccessToken
177208 _psuUploadType
gogol-logging/gogol-logging.cabal+15
@@ -36,16 +36,31 @@ library
3636 Network.Google.Logging
3737 , Network.Google.Logging.Types
3838 , Network.Google.Resource.Logging.BillingAccounts.Logs.Delete
39+ , Network.Google.Resource.Logging.BillingAccounts.Logs.List
40+ , Network.Google.Resource.Logging.BillingAccounts.Sinks.Create
41+ , Network.Google.Resource.Logging.BillingAccounts.Sinks.Delete
42+ , Network.Google.Resource.Logging.BillingAccounts.Sinks.Get
43+ , Network.Google.Resource.Logging.BillingAccounts.Sinks.List
44+ , Network.Google.Resource.Logging.BillingAccounts.Sinks.Update
3945 , Network.Google.Resource.Logging.Entries.List
4046 , Network.Google.Resource.Logging.Entries.Write
47+ , Network.Google.Resource.Logging.Folders.Logs.Delete
48+ , Network.Google.Resource.Logging.Folders.Logs.List
49+ , Network.Google.Resource.Logging.Folders.Sinks.Create
50+ , Network.Google.Resource.Logging.Folders.Sinks.Delete
51+ , Network.Google.Resource.Logging.Folders.Sinks.Get
52+ , Network.Google.Resource.Logging.Folders.Sinks.List
53+ , Network.Google.Resource.Logging.Folders.Sinks.Update
4154 , Network.Google.Resource.Logging.MonitoredResourceDescriptors.List
4255 , Network.Google.Resource.Logging.Organizations.Logs.Delete
56+ , Network.Google.Resource.Logging.Organizations.Logs.List
4357 , Network.Google.Resource.Logging.Organizations.Sinks.Create
4458 , Network.Google.Resource.Logging.Organizations.Sinks.Delete
4559 , Network.Google.Resource.Logging.Organizations.Sinks.Get
4660 , Network.Google.Resource.Logging.Organizations.Sinks.List
4761 , Network.Google.Resource.Logging.Organizations.Sinks.Update
4862 , Network.Google.Resource.Logging.Projects.Logs.Delete
63+ , Network.Google.Resource.Logging.Projects.Logs.List
4964 , Network.Google.Resource.Logging.Projects.Metrics.Create
5065 , Network.Google.Resource.Logging.Projects.Metrics.Delete
5166 , Network.Google.Resource.Logging.Projects.Metrics.Get