@@ -72,8 +72,9 @@ mrdName :: Lens' MonitoredResourceDescriptor (Maybe Text)
72mrdName = lens _mrdName (\ s a -> s{_mrdName = a})
72mrdName = lens _mrdName (\ s a -> s{_mrdName = a})
74-- | Optional. A concise name for the monitored resource type that might be
74-- | Optional. A concise name for the monitored resource type that might be
75−-- displayed in user interfaces. For example, \`\"Google Cloud SQL
75+-- displayed in user interfaces. It should be a Title Cased Noun Phrase,
76+-- without any article or other determiners. For example, \`\"Google Cloud
76−-- Database\"\`.
77+-- SQL Database\"\`.
77mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
78mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
78mrdDisplayName
79mrdDisplayName
79 = lens _mrdDisplayName
80 = lens _mrdDisplayName
@@ -90,7 +91,8 @@ mrdLabels
92-- | Required. The monitored resource type. For example, the type
93-- | Required. The monitored resource type. For example, the type
93−-- \`\"cloudsql_database\"\` represents databases in Google Cloud SQL.
94+-- \`\"cloudsql_database\"\` represents databases in Google Cloud SQL. The
95+-- maximum length of this value is 256 characters.
94mrdType :: Lens' MonitoredResourceDescriptor (Maybe Text)
96mrdType :: Lens' MonitoredResourceDescriptor (Maybe Text)
95mrdType = lens _mrdType (\ s a -> s{_mrdType = a})
97mrdType = lens _mrdType (\ s a -> s{_mrdType = a})
@@ -121,110 +123,12 @@ instance ToJSON MonitoredResourceDescriptor where
121 ("type" .=) <$> _mrdType,
123 ("type" .=) <$> _mrdType,
122 ("description" .=) <$> _mrdDescription])
124 ("description" .=) <$> _mrdDescription])
124−-- | The \`Status\` type defines a logical error model that is suitable for
125−-- different programming environments, including REST APIs and RPC APIs. It
126−-- is used by [gRPC](https:\/\/github.com\/grpc). The error model is
127−-- designed to be: - Simple to use and understand for most users - Flexible
128−-- enough to meet unexpected needs # Overview The \`Status\` message
129−-- contains three pieces of data: error code, error message, and error
130−-- details. The error code should be an enum value of google.rpc.Code, but
131−-- it may accept additional error codes if needed. The error message should
132−-- be a developer-facing English message that helps developers *understand*
133−-- and *resolve* the error. If a localized user-facing error message is
134−-- needed, put the localized message in the error details or localize it in
135−-- the client. The optional error details may contain arbitrary information
136−-- about the error. There is a predefined set of error detail types in the
137−-- package \`google.rpc\` which can be used for common error conditions. #
138−-- Language mapping The \`Status\` message is the logical representation of
139−-- the error model, but it is not necessarily the actual wire format. When
140−-- the \`Status\` message is exposed in different client libraries and
141−-- different wire protocols, it can be mapped differently. For example, it
142−-- will likely be mapped to some exceptions in Java, but more likely mapped
143−-- to some error codes in C. # Other uses The error model and the
144−-- \`Status\` message can be used in a variety of environments, either with
145−-- or without APIs, to provide a consistent developer experience across
146−-- different environments. Example uses of this error model include: -
147−-- Partial errors. If a service needs to return partial errors to the
148−-- client, it may embed the \`Status\` in the normal response to indicate
149−-- the partial errors. - Workflow errors. A typical workflow has multiple
150−-- steps. Each step may have a \`Status\` message for error reporting
151−-- purpose. - Batch operations. If a client uses batch request and batch
152−-- response, the \`Status\` message should be used directly inside batch
153−-- response, one for each error sub-response. - Asynchronous operations. If
154−-- an API call embeds asynchronous operation results in its response, the
155−-- status of those operations should be represented directly using the
156−-- \`Status\` message. - Logging. If some API errors are stored in logs,
157−-- the message \`Status\` could be used directly after any stripping needed
158−-- for security\/privacy reasons.
160−-- /See:/ 'status' smart constructor.
161−data Status = Status'
162− { _sDetails :: !(Maybe [StatusDetailsItem])
163− , _sCode :: !(Maybe (Textual Int32))
164− , _sMessage :: !(Maybe Text)
165− } deriving (Eq,Show,Data,Typeable,Generic)
167−-- | Creates a value of 'Status' with the minimum fields required to make a request.
169−-- Use one of the following lenses to modify other fields as desired:
180− { _sDetails = Nothing
182− , _sMessage = Nothing
185−-- | A list of messages that carry the error details. There will be a common
186−-- set of message types for APIs to use.
187−sDetails :: Lens' Status [StatusDetailsItem]
189− = lens _sDetails (\ s a -> s{_sDetails = a}) .
193−-- | The status code, which should be an enum value of google.rpc.Code.
194−sCode :: Lens' Status (Maybe Int32)
196− = lens _sCode (\ s a -> s{_sCode = a}) .
199−-- | A developer-facing error message, which should be in English. Any
200−-- user-facing error message should be localized and sent in the
201−-- google.rpc.Status.details field, or localized by the client.
202−sMessage :: Lens' Status (Maybe Text)
203−sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
205−instance FromJSON Status where
207− = withObject "Status"
210− (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
213−instance ToJSON Status where
217− [("details" .=) <$> _sDetails,
218− ("code" .=) <$> _sCode,
219− ("message" .=) <$> _sMessage])
221-- | Result returned from \`ListLogEntries\`.
126-- | Result returned from \`ListLogEntries\`.
223-- /See:/ 'listLogEntriesResponse' smart constructor.
128-- /See:/ 'listLogEntriesResponse' smart constructor.
224data ListLogEntriesResponse = ListLogEntriesResponse'
129data ListLogEntriesResponse = ListLogEntriesResponse'
225− { _llerNextPageToken :: !(Maybe Text)
130+ { _llerNextPageToken :: !(Maybe Text)
226− , _llerEntries :: !(Maybe [LogEntry])
131+ , _llerEntries :: !(Maybe [LogEntry])
227− , _llerProjectIdErrors :: !(Maybe ListLogEntriesResponseProjectIdErrors)
228 } deriving (Eq,Show,Data,Typeable,Generic)
132 } deriving (Eq,Show,Data,Typeable,Generic)
230-- | Creates a value of 'ListLogEntriesResponse' with the minimum fields required to make a request.
134-- | Creates a value of 'ListLogEntriesResponse' with the minimum fields required to make a request.
@@ -234,19 +138,16 @@ data ListLogEntriesResponse = ListLogEntriesResponse'
234-- * 'llerNextPageToken'
138-- * 'llerNextPageToken'
236-- * 'llerEntries'
140-- * 'llerEntries'
238−-- * 'llerProjectIdErrors'
239listLogEntriesResponse
141listLogEntriesResponse
240 :: ListLogEntriesResponse
142 :: ListLogEntriesResponse
241listLogEntriesResponse =
143listLogEntriesResponse =
242 ListLogEntriesResponse'
144 ListLogEntriesResponse'
243 { _llerNextPageToken = Nothing
145 { _llerNextPageToken = Nothing
244 , _llerEntries = Nothing
146 , _llerEntries = Nothing
245− , _llerProjectIdErrors = Nothing
248−-- | If there are more results than were returned, then \`nextPageToken\` is
149+-- | If there might be more results than appear in this response, then
249−-- included in the response. To get the next set of results, call this
150+-- \`nextPageToken\` is included. To get the next set of results, call this
250-- method again using the value of \`nextPageToken\` as \`pageToken\`.
151-- method again using the value of \`nextPageToken\` as \`pageToken\`.
251llerNextPageToken :: Lens' ListLogEntriesResponse (Maybe Text)
152llerNextPageToken :: Lens' ListLogEntriesResponse (Maybe Text)
252llerNextPageToken
153llerNextPageToken
@@ -260,29 +161,20 @@ llerEntries
261 . _Coerce
162 . _Coerce
263−-- | If partial_success is true, contains the project ids that had errors and
264−-- the associated errors.
265−llerProjectIdErrors :: Lens' ListLogEntriesResponse (Maybe ListLogEntriesResponseProjectIdErrors)
267− = lens _llerProjectIdErrors
268− (\ s a -> s{_llerProjectIdErrors = a})
270instance FromJSON ListLogEntriesResponse where
164instance FromJSON ListLogEntriesResponse where
271 parseJSON
165 parseJSON
272 = withObject "ListLogEntriesResponse"
166 = withObject "ListLogEntriesResponse"
274 ListLogEntriesResponse' <$>
168 ListLogEntriesResponse' <$>
275 (o .:? "nextPageToken") <*>
169 (o .:? "nextPageToken") <*>
276− (o .:? "entries" .!= mempty)
170+ (o .:? "entries" .!= mempty))
277− <*> (o .:? "projectIdErrors"))
279instance ToJSON ListLogEntriesResponse where
172instance ToJSON ListLogEntriesResponse where
280 toJSON ListLogEntriesResponse'{..}
173 toJSON ListLogEntriesResponse'{..}
282 (catMaybes
175 (catMaybes
283 [("nextPageToken" .=) <$> _llerNextPageToken,
176 [("nextPageToken" .=) <$> _llerNextPageToken,
284− ("entries" .=) <$> _llerEntries,
177+ ("entries" .=) <$> _llerEntries])
285− ("projectIdErrors" .=) <$> _llerProjectIdErrors])
287-- | Required. Values for all of the labels listed in the associated
179-- | Required. Values for all of the labels listed in the associated
288-- monitored resource descriptor. For example, Cloud SQL databases use the
180-- monitored resource descriptor. For example, Cloud SQL databases use the
@@ -350,8 +242,8 @@ llmrMetrics
351 . _Coerce
243 . _Coerce
353−-- | If there are more results than were returned, then \`nextPageToken\` is
245+-- | If there might be more results than appear in this response, then
354−-- included in the response. To get the next set of results, call this
246+-- \`nextPageToken\` is included. To get the next set of results, call this
355-- method again using the value of \`nextPageToken\` as \`pageToken\`.
247-- method again using the value of \`nextPageToken\` as \`pageToken\`.
356llmrNextPageToken :: Lens' ListLogMetricsResponse (Maybe Text)
248llmrNextPageToken :: Lens' ListLogMetricsResponse (Maybe Text)
357llmrNextPageToken
249llmrNextPageToken
@@ -408,8 +300,13 @@ writeLogEntriesRequest =
408 , _wlerLogName = Nothing
300 , _wlerLogName = Nothing
411−-- | Required. The log entries to write. The log entries must have values for
303+-- | Required. The log entries to write. Values supplied for the fields
412−-- all required 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.
413wlerEntries :: Lens' WriteLogEntriesRequest [LogEntry]
310wlerEntries :: Lens' WriteLogEntriesRequest [LogEntry]
414wlerEntries
311wlerEntries
415 = lens _wlerEntries (\ s a -> s{_wlerEntries = a}) .
312 = lens _wlerEntries (\ s a -> s{_wlerEntries = a}) .
@@ -426,23 +323,26 @@ wlerPartialSuccess
426 = lens _wlerPartialSuccess
323 = lens _wlerPartialSuccess
427 (\ s a -> s{_wlerPartialSuccess = a})
324 (\ s a -> s{_wlerPartialSuccess = a})
429−-- | Optional. A default monitored resource for those log entries in
326+-- | Optional. A default monitored resource object that is assigned to all
430−-- \`entries\` that do not specify their own \`resource\`.
327+-- log entries in \`entries\` that do not specify a value for \`resource\`.
328+-- Example: { \"type\": \"gce_instance\", \"labels\": { \"zone\":
329+-- \"us-central1-a\", \"instance_id\": \"00000000000000000000\" }} See
431wlerResource :: Lens' WriteLogEntriesRequest (Maybe MonitoredResource)
331wlerResource :: Lens' WriteLogEntriesRequest (Maybe MonitoredResource)
432wlerResource
332wlerResource
433 = lens _wlerResource (\ s a -> s{_wlerResource = a})
333 = lens _wlerResource (\ s a -> s{_wlerResource = a})
435−-- | Optional. User-defined \`key:value\` items that are added to the
335+-- | Optional. Default labels that are added to the \`labels\` field of all
436−-- \`labels\` field of each log entry in \`entries\`, except when a log
336+-- log entries in \`entries\`. If a log entry already has a label with the
437−-- entry specifies its own \`key:value\` item with the same key. Example:
337+-- same key as a label in this parameter, then the log entry\'s label is
438−-- \`{ \"size\": \"large\", \"color\":\"red\" }\`
338+-- not changed. See LogEntry.
439wlerLabels :: Lens' WriteLogEntriesRequest (Maybe WriteLogEntriesRequestLabels)
339wlerLabels :: Lens' WriteLogEntriesRequest (Maybe WriteLogEntriesRequestLabels)
440wlerLabels
340wlerLabels
441 = lens _wlerLabels (\ s a -> s{_wlerLabels = a})
341 = lens _wlerLabels (\ s a -> s{_wlerLabels = a})
443−-- | Optional. A default log resource name for those log entries in
343+-- | Optional. A default log resource name that is assigned to all log
444−-- \`entries\` that do not specify their own \`logName\`. Example:
344+-- entries in \`entries\` that do not specify a value for \`log_name\`.
445−-- \`\"projects\/my-project\/logs\/syslog\"\`. See LogEntry.
345+-- Example: \`\"projects\/my-project\/logs\/syslog\"\`. See LogEntry.
446wlerLogName :: Lens' WriteLogEntriesRequest (Maybe Text)
346wlerLogName :: Lens' WriteLogEntriesRequest (Maybe Text)
447wlerLogName
347wlerLogName
448 = lens _wlerLogName (\ s a -> s{_wlerLogName = a})
348 = lens _wlerLogName (\ s a -> s{_wlerLogName = a})
@@ -555,9 +455,9 @@ lsrSinks
556 . _Coerce
456 . _Coerce
558−-- | If there are more results than were returned, then \`nextPageToken\` is
458+-- | If there might be more results than appear in this response, then
559−-- included in the response. To get the next set of results, call this
459+-- \`nextPageToken\` is included. To get the next set of results, call the
560−-- method again using the value of \`nextPageToken\` as \`pageToken\`.
460+-- same method again using the value of \`nextPageToken\` as \`pageToken\`.
561lsrNextPageToken :: Lens' ListSinksResponse (Maybe Text)
461lsrNextPageToken :: Lens' ListSinksResponse (Maybe Text)
562lsrNextPageToken
462lsrNextPageToken
563 = lens _lsrNextPageToken
463 = lens _lsrNextPageToken
@@ -592,11 +492,11 @@ data RequestLog = RequestLog'
592 , _rlVersionId :: !(Maybe Text)
492 , _rlVersionId :: !(Maybe Text)
593 , _rlHTTPVersion :: !(Maybe Text)
493 , _rlHTTPVersion :: !(Maybe Text)
594 , _rlTaskName :: !(Maybe Text)
494 , _rlTaskName :: !(Maybe Text)
595− , _rlPendingTime :: !(Maybe Text)
495+ , _rlPendingTime :: !(Maybe Duration)
596 , _rlWasLoadingRequest :: !(Maybe Bool)
496 , _rlWasLoadingRequest :: !(Maybe Bool)
597 , _rlFirst :: !(Maybe Bool)
497 , _rlFirst :: !(Maybe Bool)
598− , _rlStartTime :: !(Maybe Text)
498+ , _rlStartTime :: !(Maybe DateTime')
599− , _rlLatency :: !(Maybe Text)
499+ , _rlLatency :: !(Maybe Duration)
600 , _rlURLMapEntry :: !(Maybe Text)
500 , _rlURLMapEntry :: !(Maybe Text)
601 , _rlCost :: !(Maybe (Textual Double))
501 , _rlCost :: !(Maybe (Textual Double))
602 , _rlReferrer :: !(Maybe Text)
502 , _rlReferrer :: !(Maybe Text)
@@ -605,7 +505,7 @@ data RequestLog = RequestLog'
605 , _rlAppId :: !(Maybe Text)
505 , _rlAppId :: !(Maybe Text)
606 , _rlMethod :: !(Maybe Text)
506 , _rlMethod :: !(Maybe Text)
607 , _rlResource :: !(Maybe Text)
507 , _rlResource :: !(Maybe Text)
608− , _rlEndTime :: !(Maybe Text)
508+ , _rlEndTime :: !(Maybe DateTime')
609 , _rlFinished :: !(Maybe Bool)
509 , _rlFinished :: !(Maybe Bool)
610 , _rlMegaCycles :: !(Maybe (Textual Int64))
510 , _rlMegaCycles :: !(Maybe (Textual Int64))
611 , _rlUserAgent :: !(Maybe Text)
511 , _rlUserAgent :: !(Maybe Text)
@@ -776,10 +676,11 @@ rlTaskName
776 = lens _rlTaskName (\ s a -> s{_rlTaskName = a})
676 = lens _rlTaskName (\ s a -> s{_rlTaskName = a})
778-- | Time this request spent in the pending request queue.
678-- | Time this request spent in the pending request queue.
779−rlPendingTime :: Lens' RequestLog (Maybe Text)
679+rlPendingTime :: Lens' RequestLog (Maybe Scientific)
780rlPendingTime
680rlPendingTime
781 = lens _rlPendingTime
681 = lens _rlPendingTime
782 (\ s a -> s{_rlPendingTime = a})
682 (\ s a -> s{_rlPendingTime = a})
784-- | Whether this was a loading request for the instance.
685-- | Whether this was a loading request for the instance.
785rlWasLoadingRequest :: Lens' RequestLog (Maybe Bool)
686rlWasLoadingRequest :: Lens' RequestLog (Maybe Bool)
@@ -794,14 +695,16 @@ rlFirst :: Lens' RequestLog (Maybe Bool)
794rlFirst = lens _rlFirst (\ s a -> s{_rlFirst = a})
695rlFirst = lens _rlFirst (\ s a -> s{_rlFirst = a})
796-- | Time when the request started.
697-- | Time when the request started.
797−rlStartTime :: Lens' RequestLog (Maybe Text)
698+rlStartTime :: Lens' RequestLog (Maybe UTCTime)
798rlStartTime
699rlStartTime
799− = lens _rlStartTime (\ s a -> s{_rlStartTime = a})
700+ = lens _rlStartTime (\ s a -> s{_rlStartTime = a}) .
801-- | Latency of the request.
703-- | Latency of the request.
802−rlLatency :: Lens' RequestLog (Maybe Text)
704+rlLatency :: Lens' RequestLog (Maybe Scientific)
804− = lens _rlLatency (\ s a -> s{_rlLatency = a})
706+ = lens _rlLatency (\ s a -> s{_rlLatency = a}) .
806-- | File or class that handled the request.
709-- | File or class that handled the request.
807rlURLMapEntry :: Lens' RequestLog (Maybe Text)
710rlURLMapEntry :: Lens' RequestLog (Maybe Text)
@@ -849,9 +752,10 @@ rlResource
849 = lens _rlResource (\ s a -> s{_rlResource = a})
752 = lens _rlResource (\ s a -> s{_rlResource = a})
851-- | Time when the request finished.
754-- | Time when the request finished.
852−rlEndTime :: Lens' RequestLog (Maybe Text)
755+rlEndTime :: Lens' RequestLog (Maybe UTCTime)
854− = lens _rlEndTime (\ s a -> s{_rlEndTime = a})
757+ = lens _rlEndTime (\ s a -> s{_rlEndTime = a}) .
856-- | Whether this request is finished or active.
760-- | Whether this request is finished or active.
857rlFinished :: Lens' RequestLog (Maybe Bool)
761rlFinished :: Lens' RequestLog (Maybe Bool)
@@ -985,8 +889,8 @@ instance ToJSON RequestLog where
985 ("sourceReference" .=) <$> _rlSourceReference,
889 ("sourceReference" .=) <$> _rlSourceReference,
986 ("appEngineRelease" .=) <$> _rlAppEngineRelease])
890 ("appEngineRelease" .=) <$> _rlAppEngineRelease])
988−-- | The log entry payload, represented as a protocol buffer. You can only
892+-- | The log entry payload, represented as a protocol buffer. Some Google
989−-- use \`protoPayload\` values that belong to a set of approved types.
893+-- Cloud Platform services use this field for their log entry payloads.
991-- /See:/ 'logEntryProtoPayload' smart constructor.
895-- /See:/ 'logEntryProtoPayload' smart constructor.
992newtype LogEntryProtoPayload = LogEntryProtoPayload'
896newtype LogEntryProtoPayload = LogEntryProtoPayload'
@@ -1006,7 +910,7 @@ logEntryProtoPayload pLeppAddtional_ =
1006 { _leppAddtional = _Coerce # pLeppAddtional_
910 { _leppAddtional = _Coerce # pLeppAddtional_
1009−-- | Properties of the object. Contains field \'ype with type URL.
913+-- | Properties of the object. Contains field \'type with type URL.
1010leppAddtional :: Lens' LogEntryProtoPayload (HashMap Text JSONValue)
914leppAddtional :: Lens' LogEntryProtoPayload (HashMap Text JSONValue)
1011leppAddtional
915leppAddtional
1012 = lens _leppAddtional
916 = lens _leppAddtional
@@ -1043,13 +947,17 @@ instance FromJSON WriteLogEntriesResponse where
1043instance ToJSON WriteLogEntriesResponse where
947instance ToJSON WriteLogEntriesResponse where
1044 toJSON = const emptyObject
948 toJSON = const emptyObject
1046−-- | Describes a sink used to export log entries outside Cloud Logging.
950+-- | Describes a sink used to export log entries outside of Stackdriver
1048-- /See:/ 'logSink' smart constructor.
953-- /See:/ 'logSink' smart constructor.
1049data LogSink = LogSink'
954data LogSink = LogSink'
1050 { _lsDestination :: !(Maybe Text)
955 { _lsDestination :: !(Maybe Text)
956+ , _lsStartTime :: !(Maybe DateTime')
1051− , _lsOutputVersionFormat :: !(Maybe Text)
957+ , _lsOutputVersionFormat :: !(Maybe LogSinkOutputVersionFormat)
958+ , _lsWriterIdentity :: !(Maybe Text)
1052 , _lsName :: !(Maybe Text)
959 , _lsName :: !(Maybe Text)
960+ , _lsEndTime :: !(Maybe DateTime')
1053 , _lsFilter :: !(Maybe Text)
961 , _lsFilter :: !(Maybe Text)
1054 } deriving (Eq,Show,Data,Typeable,Generic)
962 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -1059,52 +967,93 @@ data LogSink = LogSink'
1060-- * 'lsDestination'
968-- * 'lsDestination'
1062-- * 'lsOutputVersionFormat'
972-- * 'lsOutputVersionFormat'
974+-- * 'lsWriterIdentity'
1064-- * 'lsName'
976-- * 'lsName'
1066-- * 'lsFilter'
980-- * 'lsFilter'
1068 :: LogSink
982 :: LogSink
1069logSink =
983logSink =
1070 LogSink'
984 LogSink'
1071 { _lsDestination = Nothing
985 { _lsDestination = Nothing
986+ , _lsStartTime = Nothing
1072 , _lsOutputVersionFormat = Nothing
987 , _lsOutputVersionFormat = Nothing
988+ , _lsWriterIdentity = Nothing
1073 , _lsName = Nothing
989 , _lsName = Nothing
990+ , _lsEndTime = Nothing
1074 , _lsFilter = Nothing
991 , _lsFilter = Nothing
1077−-- | The export destination. See [Exporting Logs With
994+-- | Required. The export destination. See [Exporting Logs With
1078-- Sinks](\/logging\/docs\/api\/tasks\/exporting-logs). Examples:
995-- Sinks](\/logging\/docs\/api\/tasks\/exporting-logs). Examples:
1079−-- \`\"storage.googleapis.com\/a-bucket\"\`,
996+-- \"storage.googleapis.com\/my-gcs-bucket\"
1080−-- \`\"bigquery.googleapis.com\/projects\/a-project-id\/datasets\/a-dataset\"\`.
997+-- \"bigquery.googleapis.com\/projects\/my-project-id\/datasets\/my-dataset\"
998+-- \"pubsub.googleapis.com\/projects\/my-project\/topics\/my-topic\"
1081lsDestination :: Lens' LogSink (Maybe Text)
999lsDestination :: Lens' LogSink (Maybe Text)
1082lsDestination
1000lsDestination
1083 = lens _lsDestination
1001 = lens _lsDestination
1084 (\ s a -> s{_lsDestination = a})
1002 (\ s a -> s{_lsDestination = a})
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.
1008+lsStartTime :: Lens' LogSink (Maybe UTCTime)
1010+ = lens _lsStartTime (\ s a -> s{_lsStartTime = a}) .
1086−-- | The log entry version to use for this sink\'s exported log entries. This
1013+-- | Optional. The log entry version to use for this sink\'s exported log
1087−-- version does not have to correspond to the version of the log entry when
1014+-- entries. This version does not have to correspond to the version of the
1088−-- it was written to Cloud Logging.
1015+-- log entry that was written to Stackdriver Logging. If omitted, the v2
1089−lsOutputVersionFormat :: Lens' LogSink (Maybe Text)
1017+lsOutputVersionFormat :: Lens' LogSink (Maybe LogSinkOutputVersionFormat)
1090lsOutputVersionFormat
1018lsOutputVersionFormat
1091 = lens _lsOutputVersionFormat
1019 = lens _lsOutputVersionFormat
1092 (\ s a -> s{_lsOutputVersionFormat = a})
1020 (\ s a -> s{_lsOutputVersionFormat = a})
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
1031+lsWriterIdentity :: Lens' LogSink (Maybe Text)
1033+ = lens _lsWriterIdentity
1034+ (\ s a -> s{_lsWriterIdentity = a})
1094−-- | Required. The client-assigned sink identifier. Example:
1036+-- | Required. The client-assigned sink identifier, unique within the
1095−-- \`\"my-severe-errors-to-pubsub\"\`. Sink identifiers are limited to 1000
1037+-- project. Example: \`\"my-syslog-errors-to-pubsub\"\`. Sink identifiers
1096−-- characters and can include only the following characters: \`A-Z\`,
1038+-- are limited to 1000 characters and can include only the following
1097−-- \`a-z\`, \`0-9\`, and the special characters \`_-.\`.
1039+-- characters: \`A-Z\`, \`a-z\`, \`0-9\`, and the special characters
1040+-- \`_-.\`. The maximum length of the name is 100 characters.
1098lsName :: Lens' LogSink (Maybe Text)
1041lsName :: Lens' LogSink (Maybe Text)
1099lsName = lens _lsName (\ s a -> s{_lsName = a})
1042lsName = lens _lsName (\ s a -> s{_lsName = a})
1044+-- | Optional. Time at which this sink expires.
1045+lsEndTime :: Lens' LogSink (Maybe UTCTime)
1047+ = lens _lsEndTime (\ s a -> s{_lsEndTime = a}) .
1050+-- | Optional. An [advanced logs
1101−-- | An [advanced logs filter](\/logging\/docs\/view\/advanced_filters). Only
1051+-- filter](\/logging\/docs\/view\/advanced_filters). Only log entries
1102−-- log entries matching that filter are exported. The filter must be
1052+-- matching the filter are exported. The filter must be consistent with the
1103−-- consistent with the log entry format specified by the
1053+-- log entry format specified by the \`outputVersionFormat\` parameter,
1104−-- \`outputVersionFormat\` parameter, regardless of the format of the log
1105−-- entry that was originally written to Cloud Logging. Example (V2 format):
1054+-- regardless of the format of the log entry that was originally written to
1055+-- Stackdriver Logging. Example filter (V2 format):
1106−-- \`\"logName=projects\/my-projectid\/logs\/syslog AND
1056+-- logName=projects\/my-projectid\/logs\/syslog AND severity>=ERROR
1107−-- severity>=ERROR\"\`.
1108lsFilter :: Lens' LogSink (Maybe Text)
1057lsFilter :: Lens' LogSink (Maybe Text)
1109lsFilter = lens _lsFilter (\ s a -> s{_lsFilter = a})
1058lsFilter = lens _lsFilter (\ s a -> s{_lsFilter = a})
@@ -1113,9 +1062,11 @@ instance FromJSON LogSink where
1113 = withObject "LogSink"
1062 = withObject "LogSink"
1115 LogSink' <$>
1064 LogSink' <$>
1116− (o .:? "destination") <*>
1065+ (o .:? "destination") <*> (o .:? "startTime") <*>
1117 (o .:? "outputVersionFormat")
1066 (o .:? "outputVersionFormat")
1067+ <*> (o .:? "writerIdentity")
1118 <*> (o .:? "name")
1068 <*> (o .:? "name")
1069+ <*> (o .:? "endTime")
1119 <*> (o .:? "filter"))
1070 <*> (o .:? "filter"))
1121instance ToJSON LogSink where
1072instance ToJSON LogSink where
@@ -1123,44 +1074,14 @@ instance ToJSON LogSink where
1123 = object
1074 = object
1124 (catMaybes
1075 (catMaybes
1125 [("destination" .=) <$> _lsDestination,
1076 [("destination" .=) <$> _lsDestination,
1077+ ("startTime" .=) <$> _lsStartTime,
1126 ("outputVersionFormat" .=) <$>
1078 ("outputVersionFormat" .=) <$>
1127 _lsOutputVersionFormat,
1079 _lsOutputVersionFormat,
1080+ ("writerIdentity" .=) <$> _lsWriterIdentity,
1128 ("name" .=) <$> _lsName,
1081 ("name" .=) <$> _lsName,
1082+ ("endTime" .=) <$> _lsEndTime,
1129 ("filter" .=) <$> _lsFilter])
1083 ("filter" .=) <$> _lsFilter])
1132−-- /See:/ 'statusDetailsItem' smart constructor.
1133−newtype StatusDetailsItem = StatusDetailsItem'
1134− { _sdiAddtional :: HashMap Text JSONValue
1135− } deriving (Eq,Show,Data,Typeable,Generic)
1137−-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
1139−-- Use one of the following lenses to modify other fields as desired:
1143− :: HashMap Text JSONValue -- ^ 'sdiAddtional'
1144− -> StatusDetailsItem
1145−statusDetailsItem pSdiAddtional_ =
1147− { _sdiAddtional = _Coerce # pSdiAddtional_
1150−-- | Properties of the object. Contains field \'ype with type URL.
1151−sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
1153− = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
1156−instance FromJSON StatusDetailsItem where
1158− = withObject "StatusDetailsItem"
1159− (\ o -> StatusDetailsItem' <$> (parseJSONObject o))
1161−instance ToJSON StatusDetailsItem where
1162− toJSON = toJSON . _sdiAddtional
1164-- | Result returned from ListMonitoredResourceDescriptors.
1085-- | Result returned from ListMonitoredResourceDescriptors.
1166-- /See:/ 'listMonitoredResourceDescriptorsResponse' smart constructor.
1087-- /See:/ 'listMonitoredResourceDescriptorsResponse' smart constructor.
@@ -1184,8 +1105,8 @@ listMonitoredResourceDescriptorsResponse =
1184 , _lmrdrResourceDescriptors = Nothing
1105 , _lmrdrResourceDescriptors = Nothing
1187−-- | If there are more results than were returned, then \`nextPageToken\` is
1108+-- | If there might be more results than appear in this response, then
1188−-- included in the response. To get the next set of results, call this
1109+-- \`nextPageToken\` is included. To get the next set of results, call this
1189-- method again using the value of \`nextPageToken\` as \`pageToken\`.
1110-- method again using the value of \`nextPageToken\` as \`pageToken\`.
1190lmrdrNextPageToken :: Lens' ListMonitoredResourceDescriptorsResponse (Maybe Text)
1111lmrdrNextPageToken :: Lens' ListMonitoredResourceDescriptorsResponse (Maybe Text)
1191lmrdrNextPageToken
1112lmrdrNextPageToken
@@ -1219,7 +1140,9 @@ instance ToJSON
1219 ("resourceDescriptors" .=) <$>
1140 ("resourceDescriptors" .=) <$>
1220 _lmrdrResourceDescriptors])
1141 _lmrdrResourceDescriptors])
1222−-- | A common proto for logging HTTP requests.
1143+-- | A common proto for logging HTTP requests. Only contains semantics
1144+-- defined by the HTTP specification. Product-specific logging information
1145+-- MUST be defined in a separate message.
1224-- /See:/ 'hTTPRequest' smart constructor.
1147-- /See:/ 'hTTPRequest' smart constructor.
1225data HTTPRequest = HTTPRequest'
1148data HTTPRequest = HTTPRequest'
@@ -1227,6 +1150,8 @@ data HTTPRequest = HTTPRequest'
1227 , _httprRequestURL :: !(Maybe Text)
1150 , _httprRequestURL :: !(Maybe Text)
1228 , _httprCacheFillBytes :: !(Maybe (Textual Int64))
1151 , _httprCacheFillBytes :: !(Maybe (Textual Int64))
1229 , _httprRemoteIP :: !(Maybe Text)
1152 , _httprRemoteIP :: !(Maybe Text)
1153+ , _httprLatency :: !(Maybe Duration)
1154+ , _httprServerIP :: !(Maybe Text)
1230 , _httprRequestSize :: !(Maybe (Textual Int64))
1155 , _httprRequestSize :: !(Maybe (Textual Int64))
1231 , _httprCacheValidatedWithOriginServer :: !(Maybe Bool)
1156 , _httprCacheValidatedWithOriginServer :: !(Maybe Bool)
1232 , _httprUserAgent :: !(Maybe Text)
1157 , _httprUserAgent :: !(Maybe Text)
@@ -1249,6 +1174,10 @@ data HTTPRequest = HTTPRequest'
1250-- * 'httprRemoteIP'
1175-- * 'httprRemoteIP'
1179+-- * 'httprServerIP'
1252-- * 'httprRequestSize'
1181-- * 'httprRequestSize'
1254-- * 'httprCacheValidatedWithOriginServer'
1183-- * 'httprCacheValidatedWithOriginServer'
@@ -1272,6 +1201,8 @@ hTTPRequest =
1272 , _httprRequestURL = Nothing
1201 , _httprRequestURL = Nothing
1273 , _httprCacheFillBytes = Nothing
1202 , _httprCacheFillBytes = Nothing
1274 , _httprRemoteIP = Nothing
1203 , _httprRemoteIP = Nothing
1204+ , _httprLatency = Nothing
1205+ , _httprServerIP = Nothing
1275 , _httprRequestSize = Nothing
1206 , _httprRequestSize = Nothing
1276 , _httprCacheValidatedWithOriginServer = Nothing
1207 , _httprCacheValidatedWithOriginServer = Nothing
1277 , _httprUserAgent = Nothing
1208 , _httprUserAgent = Nothing
@@ -1312,6 +1243,20 @@ httprRemoteIP
1312 = lens _httprRemoteIP
1243 = lens _httprRemoteIP
1313 (\ s a -> s{_httprRemoteIP = a})
1244 (\ s a -> s{_httprRemoteIP = a})
1246+-- | The request processing latency on the server, from the time the request
1247+-- was received until the response was sent.
1248+httprLatency :: Lens' HTTPRequest (Maybe Scientific)
1250+ = lens _httprLatency (\ s a -> s{_httprLatency = a})
1251+ . mapping _Duration
1253+-- | The IP address (IPv4 or IPv6) of the origin server that the request was
1255+httprServerIP :: Lens' HTTPRequest (Maybe Text)
1257+ = lens _httprServerIP
1258+ (\ s a -> s{_httprServerIP = a})
1315-- | The size of the HTTP request message in bytes, including the request
1260-- | The size of the HTTP request message in bytes, including the request
1316-- headers and the request body.
1261-- headers and the request body.
1317httprRequestSize :: Lens' HTTPRequest (Maybe Int64)
1262httprRequestSize :: Lens' HTTPRequest (Maybe Int64)
@@ -1378,6 +1323,8 @@ instance FromJSON HTTPRequest where
1378 (o .:? "status") <*> (o .:? "requestUrl") <*>
1323 (o .:? "status") <*> (o .:? "requestUrl") <*>
1379 (o .:? "cacheFillBytes")
1324 (o .:? "cacheFillBytes")
1380 <*> (o .:? "remoteIp")
1325 <*> (o .:? "remoteIp")
1326+ <*> (o .:? "latency")
1327+ <*> (o .:? "serverIp")
1381 <*> (o .:? "requestSize")
1328 <*> (o .:? "requestSize")
1382 <*> (o .:? "cacheValidatedWithOriginServer")
1329 <*> (o .:? "cacheValidatedWithOriginServer")
1383 <*> (o .:? "userAgent")
1330 <*> (o .:? "userAgent")
@@ -1395,6 +1342,8 @@ instance ToJSON HTTPRequest where
1395 ("requestUrl" .=) <$> _httprRequestURL,
1342 ("requestUrl" .=) <$> _httprRequestURL,
1396 ("cacheFillBytes" .=) <$> _httprCacheFillBytes,
1343 ("cacheFillBytes" .=) <$> _httprCacheFillBytes,
1397 ("remoteIp" .=) <$> _httprRemoteIP,
1344 ("remoteIp" .=) <$> _httprRemoteIP,
1345+ ("latency" .=) <$> _httprLatency,
1346+ ("serverIp" .=) <$> _httprServerIP,
1398 ("requestSize" .=) <$> _httprRequestSize,
1347 ("requestSize" .=) <$> _httprRequestSize,
1399 ("cacheValidatedWithOriginServer" .=) <$>
1348 ("cacheValidatedWithOriginServer" .=) <$>
1400 _httprCacheValidatedWithOriginServer,
1349 _httprCacheValidatedWithOriginServer,
@@ -1405,49 +1354,10 @@ instance ToJSON HTTPRequest where
1405 ("cacheHit" .=) <$> _httprCacheHit,
1354 ("cacheHit" .=) <$> _httprCacheHit,
1406 ("referer" .=) <$> _httprReferer])
1355 ("referer" .=) <$> _httprReferer])
1408−-- | If partial_success is true, contains the project ids that had errors and
1409−-- the associated errors.
1411−-- /See:/ 'listLogEntriesResponseProjectIdErrors' smart constructor.
1412−newtype ListLogEntriesResponseProjectIdErrors = ListLogEntriesResponseProjectIdErrors'
1413− { _llerpieAddtional :: HashMap Text Status
1414− } deriving (Eq,Show,Data,Typeable,Generic)
1416−-- | Creates a value of 'ListLogEntriesResponseProjectIdErrors' with the minimum fields required to make a request.
1418−-- Use one of the following lenses to modify other fields as desired:
1420−-- * 'llerpieAddtional'
1421−listLogEntriesResponseProjectIdErrors
1422− :: HashMap Text Status -- ^ 'llerpieAddtional'
1423− -> ListLogEntriesResponseProjectIdErrors
1424−listLogEntriesResponseProjectIdErrors pLlerpieAddtional_ =
1425− ListLogEntriesResponseProjectIdErrors'
1426− { _llerpieAddtional = _Coerce # pLlerpieAddtional_
1429−llerpieAddtional :: Lens' ListLogEntriesResponseProjectIdErrors (HashMap Text Status)
1431− = lens _llerpieAddtional
1432− (\ s a -> s{_llerpieAddtional = a})
1436− ListLogEntriesResponseProjectIdErrors where
1438− = withObject "ListLogEntriesResponseProjectIdErrors"
1440− ListLogEntriesResponseProjectIdErrors' <$>
1441− (parseJSONObject o))
1443−instance ToJSON ListLogEntriesResponseProjectIdErrors
1445− toJSON = toJSON . _llerpieAddtional
1447−-- | Optional. User-defined \`key:value\` items that are added to the
1357+-- | Optional. Default labels that are added to the \`labels\` field of all
1448−-- \`labels\` field of each log entry in \`entries\`, except when a log
1358+-- log entries in \`entries\`. If a log entry already has a label with the
1449−-- entry specifies its own \`key:value\` item with the same key. Example:
1359+-- same key as a label in this parameter, then the log entry\'s label is
1450−-- \`{ \"size\": \"large\", \"color\":\"red\" }\`
1360+-- not changed. See LogEntry.
1452-- /See:/ 'writeLogEntriesRequestLabels' smart constructor.
1362-- /See:/ 'writeLogEntriesRequestLabels' smart constructor.
1453newtype WriteLogEntriesRequestLabels = WriteLogEntriesRequestLabels'
1363newtype WriteLogEntriesRequestLabels = WriteLogEntriesRequestLabels'
@@ -1493,7 +1403,7 @@ instance ToJSON WriteLogEntriesRequestLabels where
1493-- following object, because the MonitoredResourceDescriptor for
1403-- following object, because the MonitoredResourceDescriptor for
1494-- \`\"gce_instance\"\` has labels \`\"instance_id\"\` and \`\"zone\"\`: {
1404-- \`\"gce_instance\"\` has labels \`\"instance_id\"\` and \`\"zone\"\`: {
1495-- \"type\": \"gce_instance\", \"labels\": { \"instance_id\":
1405-- \"type\": \"gce_instance\", \"labels\": { \"instance_id\":
1496−-- \"my-instance\", \"zone\": \"us-central1-a\" }}
1406+-- \"12345678901234\", \"zone\": \"us-central1-a\" }}
1498-- /See:/ 'monitoredResource' smart constructor.
1408-- /See:/ 'monitoredResource' smart constructor.
1499data MonitoredResource = MonitoredResource'
1409data MonitoredResource = MonitoredResource'
@@ -1546,8 +1456,8 @@ instance ToJSON MonitoredResource where
1547-- /See:/ 'logLine' smart constructor.
1457-- /See:/ 'logLine' smart constructor.
1548data LogLine = LogLine'
1458data LogLine = LogLine'
1549− { _llTime :: !(Maybe Text)
1459+ { _llTime :: !(Maybe DateTime')
1550− , _llSeverity :: !(Maybe Text)
1460+ , _llSeverity :: !(Maybe LogLineSeverity)
1551 , _llLogMessage :: !(Maybe Text)
1461 , _llLogMessage :: !(Maybe Text)
1552 , _llSourceLocation :: !(Maybe SourceLocation)
1462 , _llSourceLocation :: !(Maybe SourceLocation)
1553 } deriving (Eq,Show,Data,Typeable,Generic)
1463 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -1574,11 +1484,13 @@ logLine =
1576-- | Approximate time when this log entry was made.
1486-- | Approximate time when this log entry was made.
1577−llTime :: Lens' LogLine (Maybe Text)
1487+llTime :: Lens' LogLine (Maybe UTCTime)
1578−llTime = lens _llTime (\ s a -> s{_llTime = a})
1489+ = lens _llTime (\ s a -> s{_llTime = a}) .
1580-- | Severity of this log entry.
1492-- | Severity of this log entry.
1581−llSeverity :: Lens' LogLine (Maybe Text)
1493+llSeverity :: Lens' LogLine (Maybe LogLineSeverity)
1582llSeverity
1494llSeverity
1583 = lens _llSeverity (\ s a -> s{_llSeverity = a})
1495 = lens _llSeverity (\ s a -> s{_llSeverity = a})
@@ -1616,7 +1528,7 @@ instance ToJSON LogLine where
1616-- /See:/ 'labelDescriptor' smart constructor.
1528-- /See:/ 'labelDescriptor' smart constructor.
1617data LabelDescriptor = LabelDescriptor'
1529data LabelDescriptor = LabelDescriptor'
1618 { _ldKey :: !(Maybe Text)
1530 { _ldKey :: !(Maybe Text)
1619− , _ldValueType :: !(Maybe Text)
1531+ , _ldValueType :: !(Maybe LabelDescriptorValueType)
1620 , _ldDescription :: !(Maybe Text)
1532 , _ldDescription :: !(Maybe Text)
1621 } deriving (Eq,Show,Data,Typeable,Generic)
1533 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -1643,7 +1555,7 @@ ldKey :: Lens' LabelDescriptor (Maybe Text)
1643ldKey = lens _ldKey (\ s a -> s{_ldKey = a})
1555ldKey = lens _ldKey (\ s a -> s{_ldKey = a})
1645-- | The type of data that can be assigned to the label.
1557-- | The type of data that can be assigned to the label.
1646−ldValueType :: Lens' LabelDescriptor (Maybe Text)
1558+ldValueType :: Lens' LabelDescriptor (Maybe LabelDescriptorValueType)
1647ldValueType
1559ldValueType
1648 = lens _ldValueType (\ s a -> s{_ldValueType = a})
1560 = lens _ldValueType (\ s a -> s{_ldValueType = a})
@@ -1673,12 +1585,12 @@ instance ToJSON LabelDescriptor where
1674-- /See:/ 'listLogEntriesRequest' smart constructor.
1586-- /See:/ 'listLogEntriesRequest' smart constructor.
1675data ListLogEntriesRequest = ListLogEntriesRequest'
1587data ListLogEntriesRequest = ListLogEntriesRequest'
1676− { _llerOrderBy :: !(Maybe Text)
1588+ { _llerOrderBy :: !(Maybe Text)
1677− , _llerPartialSuccess :: !(Maybe Bool)
1678− , _llerProjectIds :: !(Maybe [Text])
1589+ , _llerProjectIds :: !(Maybe [Text])
1679− , _llerFilter :: !(Maybe Text)
1590+ , _llerFilter :: !(Maybe Text)
1680− , _llerPageToken :: !(Maybe Text)
1591+ , _llerPageToken :: !(Maybe Text)
1681− , _llerPageSize :: !(Maybe (Textual Int32))
1592+ , _llerPageSize :: !(Maybe (Textual Int32))
1593+ , _llerResourceNames :: !(Maybe [Text])
1682 } deriving (Eq,Show,Data,Typeable,Generic)
1594 } deriving (Eq,Show,Data,Typeable,Generic)
1684-- | Creates a value of 'ListLogEntriesRequest' with the minimum fields required to make a request.
1596-- | Creates a value of 'ListLogEntriesRequest' with the minimum fields required to make a request.
@@ -1687,8 +1599,6 @@ data ListLogEntriesRequest = ListLogEntriesRequest'
1688-- * 'llerOrderBy'
1600-- * 'llerOrderBy'
1690−-- * 'llerPartialSuccess'
1692-- * 'llerProjectIds'
1602-- * 'llerProjectIds'
1694-- * 'llerFilter'
1604-- * 'llerFilter'
@@ -1696,16 +1606,18 @@ data ListLogEntriesRequest = ListLogEntriesRequest'
1696-- * 'llerPageToken'
1606-- * 'llerPageToken'
1698-- * 'llerPageSize'
1608-- * 'llerPageSize'
1610+-- * 'llerResourceNames'
1699listLogEntriesRequest
1611listLogEntriesRequest
1700 :: ListLogEntriesRequest
1612 :: ListLogEntriesRequest
1701listLogEntriesRequest =
1613listLogEntriesRequest =
1702 ListLogEntriesRequest'
1614 ListLogEntriesRequest'
1703 { _llerOrderBy = Nothing
1615 { _llerOrderBy = Nothing
1704− , _llerPartialSuccess = Nothing
1705 , _llerProjectIds = Nothing
1616 , _llerProjectIds = Nothing
1706 , _llerFilter = Nothing
1617 , _llerFilter = Nothing
1707 , _llerPageToken = Nothing
1618 , _llerPageToken = Nothing
1708 , _llerPageSize = Nothing
1619 , _llerPageSize = Nothing
1620+ , _llerResourceNames = Nothing
1711-- | Optional. How the results should be sorted. Presently, the only
1623-- | Optional. How the results should be sorted. Presently, the only
@@ -1718,17 +1630,12 @@ llerOrderBy :: Lens' ListLogEntriesRequest (Maybe Text)
1718llerOrderBy
1630llerOrderBy
1719 = lens _llerOrderBy (\ s a -> s{_llerOrderBy = a})
1631 = lens _llerOrderBy (\ s a -> s{_llerOrderBy = a})
1721−-- | Optional. If true, read access to all projects is not required and
1722−-- results will be returned for the subset of projects for which read
1723−-- access is permitted (empty subset is permitted).
1724−llerPartialSuccess :: Lens' ListLogEntriesRequest (Maybe Bool)
1726− = lens _llerPartialSuccess
1727− (\ s a -> s{_llerPartialSuccess = a})
1729−-- | Required. One or more project IDs or project numbers from which to
1633+-- | Deprecated. One or more project identifiers or project numbers from
1730−-- retrieve log entries. Examples of a project ID: \`\"my-project-1A\"\`,
1634+-- which to retrieve log entries. Examples: \`\"my-project-1A\"\`,
1731−-- \`\"1234567890\"\`.
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
1732llerProjectIds :: Lens' ListLogEntriesRequest [Text]
1639llerProjectIds :: Lens' ListLogEntriesRequest [Text]
1733llerProjectIds
1640llerProjectIds
1734 = lens _llerProjectIds
1641 = lens _llerProjectIds
@@ -1736,56 +1643,63 @@ llerProjectIds
1736 . _Default
1643 . _Default
1737 . _Coerce
1644 . _Coerce
1739−-- | Optional. An [advanced logs
1646+-- | Optional. A filter that chooses which log entries to return. See
1740−-- filter](\/logging\/docs\/view\/advanced_filters). The filter is compared
1647+-- [Advanced Logs Filters](\/logging\/docs\/view\/advanced_filters). Only
1741−-- against all log entries in the projects specified by \`projectIds\`.
1742−-- Only entries that match the filter are retrieved. An empty filter
1648+-- log entries that match the filter are returned. An empty filter matches
1743−-- matches all log entries.
1649+-- all log entries.
1744llerFilter :: Lens' ListLogEntriesRequest (Maybe Text)
1650llerFilter :: Lens' ListLogEntriesRequest (Maybe Text)
1745llerFilter
1651llerFilter
1746 = lens _llerFilter (\ s a -> s{_llerFilter = a})
1652 = lens _llerFilter (\ s a -> s{_llerFilter = a})
1748−-- | Optional. If the \`pageToken\` parameter is supplied, then the next page
1654+-- | Optional. If present, then retrieve the next batch of results from the
1749−-- of results is retrieved. The \`pageToken\` parameter must be set to the
1655+-- preceding call to this method. \`pageToken\` must be the value of
1750−-- value of the \`nextPageToken\` from the previous response. The values of
1656+-- \`nextPageToken\` from the previous response. The values of other method
1751−-- \`projectIds\`, \`filter\`, and \`orderBy\` must be the same as in the
1657+-- parameters should be identical to those in the previous call.
1752−-- previous request.
1753llerPageToken :: Lens' ListLogEntriesRequest (Maybe Text)
1658llerPageToken :: Lens' ListLogEntriesRequest (Maybe Text)
1754llerPageToken
1659llerPageToken
1755 = lens _llerPageToken
1660 = lens _llerPageToken
1756 (\ s a -> s{_llerPageToken = a})
1661 (\ s a -> s{_llerPageToken = a})
1758−-- | Optional. The maximum number of results to return from this request. You
1663+-- | Optional. The maximum number of results to return from this request.
1759−-- must check for presence of \`nextPageToken\` to determine if additional
1664+-- Non-positive values are ignored. The presence of \`nextPageToken\` in
1760−-- results are available, which you can retrieve by passing the
1665+-- the response indicates that more results might be available.
1761−-- \`nextPageToken\` value as the \`pageToken\` parameter in the next
1763llerPageSize :: Lens' ListLogEntriesRequest (Maybe Int32)
1666llerPageSize :: Lens' ListLogEntriesRequest (Maybe Int32)
1764llerPageSize
1667llerPageSize
1765 = lens _llerPageSize (\ s a -> s{_llerPageSize = a})
1668 = lens _llerPageSize (\ s a -> s{_llerPageSize = a})
1766 . mapping _Coerce
1669 . mapping _Coerce
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.
1675+llerResourceNames :: Lens' ListLogEntriesRequest [Text]
1677+ = lens _llerResourceNames
1678+ (\ s a -> s{_llerResourceNames = a})
1768instance FromJSON ListLogEntriesRequest where
1682instance FromJSON ListLogEntriesRequest where
1769 parseJSON
1683 parseJSON
1770 = withObject "ListLogEntriesRequest"
1684 = withObject "ListLogEntriesRequest"
1772 ListLogEntriesRequest' <$>
1686 ListLogEntriesRequest' <$>
1773− (o .:? "orderBy") <*> (o .:? "partialSuccess") <*>
1774− (o .:? "projectIds" .!= mempty)
1687+ (o .:? "orderBy") <*> (o .:? "projectIds" .!= mempty)
1775 <*> (o .:? "filter")
1688 <*> (o .:? "filter")
1776 <*> (o .:? "pageToken")
1689 <*> (o .:? "pageToken")
1777− <*> (o .:? "pageSize"))
1690+ <*> (o .:? "pageSize")
1691+ <*> (o .:? "resourceNames" .!= mempty))
1779instance ToJSON ListLogEntriesRequest where
1693instance ToJSON ListLogEntriesRequest where
1780 toJSON ListLogEntriesRequest'{..}
1694 toJSON ListLogEntriesRequest'{..}
1781 = object
1695 = object
1782 (catMaybes
1696 (catMaybes
1783 [("orderBy" .=) <$> _llerOrderBy,
1697 [("orderBy" .=) <$> _llerOrderBy,
1784− ("partialSuccess" .=) <$> _llerPartialSuccess,
1785 ("projectIds" .=) <$> _llerProjectIds,
1698 ("projectIds" .=) <$> _llerProjectIds,
1786 ("filter" .=) <$> _llerFilter,
1699 ("filter" .=) <$> _llerFilter,
1787 ("pageToken" .=) <$> _llerPageToken,
1700 ("pageToken" .=) <$> _llerPageToken,
1788− ("pageSize" .=) <$> _llerPageSize])
1701+ ("pageSize" .=) <$> _llerPageSize,
1702+ ("resourceNames" .=) <$> _llerResourceNames])
1790-- | Additional information about a potentially long-running operation with
1704-- | Additional information about a potentially long-running operation with
1791-- which a log entry is associated.
1705-- which a log entry is associated.
@@ -1824,10 +1738,10 @@ logEntryOperation =
1824leoFirst :: Lens' LogEntryOperation (Maybe Bool)
1738leoFirst :: Lens' LogEntryOperation (Maybe Bool)
1825leoFirst = lens _leoFirst (\ s a -> s{_leoFirst = a})
1739leoFirst = lens _leoFirst (\ s a -> s{_leoFirst = a})
1827−-- | Required. An arbitrary producer identifier. The combination of \`id\`
1741+-- | Optional. An arbitrary producer identifier. The combination of \`id\`
1828-- and \`producer\` must be globally unique. Examples for \`producer\`:
1742-- and \`producer\` must be globally unique. Examples for \`producer\`:
1829-- \`\"MyDivision.MyBigCompany.com\"\`,
1743-- \`\"MyDivision.MyBigCompany.com\"\`,
1830−-- \"github.com\/MyProject\/MyApplication\"\`.
1744+-- \`\"github.com\/MyProject\/MyApplication\"\`.
1831leoProducer :: Lens' LogEntryOperation (Maybe Text)
1745leoProducer :: Lens' LogEntryOperation (Maybe Text)
1832leoProducer
1746leoProducer
1833 = lens _leoProducer (\ s a -> s{_leoProducer = a})
1747 = lens _leoProducer (\ s a -> s{_leoProducer = a})
@@ -1837,7 +1751,7 @@ leoProducer
1837leoLast :: Lens' LogEntryOperation (Maybe Bool)
1751leoLast :: Lens' LogEntryOperation (Maybe Bool)
1838leoLast = lens _leoLast (\ s a -> s{_leoLast = a})
1752leoLast = lens _leoLast (\ s a -> s{_leoLast = a})
1840−-- | Required. An arbitrary operation identifier. Log entries with the same
1754+-- | Optional. An arbitrary operation identifier. Log entries with the same
1841-- identifier are assumed to be part of the same operation.
1755-- identifier are assumed to be part of the same operation.
1842leoId :: Lens' LogEntryOperation (Maybe Text)
1756leoId :: Lens' LogEntryOperation (Maybe Text)
1843leoId = lens _leoId (\ s a -> s{_leoId = a})
1757leoId = lens _leoId (\ s a -> s{_leoId = a})
@@ -1865,6 +1779,7 @@ instance ToJSON LogEntryOperation where
1865-- /See:/ 'logMetric' smart constructor.
1779-- /See:/ 'logMetric' smart constructor.
1866data LogMetric = LogMetric'
1780data LogMetric = LogMetric'
1867 { _lmName :: !(Maybe Text)
1781 { _lmName :: !(Maybe Text)
1782+ , _lmVersion :: !(Maybe LogMetricVersion)
1868 , _lmFilter :: !(Maybe Text)
1783 , _lmFilter :: !(Maybe Text)
1869 , _lmDescription :: !(Maybe Text)
1784 , _lmDescription :: !(Maybe Text)
1870 } deriving (Eq,Show,Data,Typeable,Generic)
1785 } deriving (Eq,Show,Data,Typeable,Generic)
@@ -1875,6 +1790,8 @@ data LogMetric = LogMetric'
1876-- * 'lmName'
1791-- * 'lmName'
1878-- * 'lmFilter'
1795-- * 'lmFilter'
1880-- * 'lmDescription'
1797-- * 'lmDescription'
@@ -1883,25 +1800,36 @@ logMetric
1883logMetric =
1800logMetric =
1884 LogMetric'
1801 LogMetric'
1885 { _lmName = Nothing
1802 { _lmName = Nothing
1803+ , _lmVersion = Nothing
1886 , _lmFilter = Nothing
1804 , _lmFilter = Nothing
1887 , _lmDescription = Nothing
1805 , _lmDescription = Nothing
1890-- | Required. The client-assigned metric identifier. Example:
1808-- | Required. The client-assigned metric identifier. Example:
1891−-- \`\"severe_errors\"\`. Metric identifiers are limited to 1000 characters
1809+-- \`\"severe_errors\"\`. Metric identifiers are limited to 100 characters
1892-- and can include only the following characters: \`A-Z\`, \`a-z\`,
1810-- and can include only the following characters: \`A-Z\`, \`a-z\`,
1893−-- \`0-9\`, and the special characters \`_-.,+!*\',()%\/\\\`. The
1811+-- \`0-9\`, and the special characters \`_-.,+!*\',()%\/\`. The
1894-- forward-slash character (\`\/\`) denotes a hierarchy of name pieces, and
1812-- forward-slash character (\`\/\`) denotes a hierarchy of name pieces, and
1895−-- it cannot be the first character of the name.
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.
1896lmName :: Lens' LogMetric (Maybe Text)
1816lmName :: Lens' LogMetric (Maybe Text)
1897lmName = lens _lmName (\ s a -> s{_lmName = a})
1817lmName = lens _lmName (\ s a -> s{_lmName = a})
1819+-- | Output only. The API version that created or updated this metric. The
1820+-- version also dictates the syntax of the filter expression. When a value
1821+-- for this field is missing, the default value of V2 should be assumed.
1822+lmVersion :: Lens' LogMetric (Maybe LogMetricVersion)
1824+ = lens _lmVersion (\ s a -> s{_lmVersion = a})
1826+-- | Required. An [advanced logs
1899−-- | An [advanced logs filter](\/logging\/docs\/view\/advanced_filters).
1827+-- filter](\/logging\/docs\/view\/advanced_filters). Example:
1900−-- Example: \`\"logName:syslog AND severity>=ERROR\"\`.
1828+-- \`\"resource.type=gae_app AND severity>=ERROR\"\`.
1901lmFilter :: Lens' LogMetric (Maybe Text)
1829lmFilter :: Lens' LogMetric (Maybe Text)
1902lmFilter = lens _lmFilter (\ s a -> s{_lmFilter = a})
1830lmFilter = lens _lmFilter (\ s a -> s{_lmFilter = a})
1904−-- | A description of this metric, which is used in documentation.
1832+-- | Optional. A description of this metric, which is used in documentation.
1905lmDescription :: Lens' LogMetric (Maybe Text)
1833lmDescription :: Lens' LogMetric (Maybe Text)
1906lmDescription
1834lmDescription
1907 = lens _lmDescription
1835 = lens _lmDescription
@@ -1912,14 +1840,16 @@ instance FromJSON LogMetric where
1912 = withObject "LogMetric"
1840 = withObject "LogMetric"
1914 LogMetric' <$>
1842 LogMetric' <$>
1843+ (o .:? "name") <*> (o .:? "version") <*>
1915− (o .:? "name") <*> (o .:? "filter") <*>
1844+ (o .:? "filter")
1916− (o .:? "description"))
1845+ <*> (o .:? "description"))
1918instance ToJSON LogMetric where
1847instance ToJSON LogMetric where
1919 toJSON LogMetric'{..}
1848 toJSON LogMetric'{..}
1920 = object
1849 = object
1921 (catMaybes
1850 (catMaybes
1922 [("name" .=) <$> _lmName,
1851 [("name" .=) <$> _lmName,
1852+ ("version" .=) <$> _lmVersion,
1923 ("filter" .=) <$> _lmFilter,
1853 ("filter" .=) <$> _lmFilter,
1924 ("description" .=) <$> _lmDescription])
1854 ("description" .=) <$> _lmDescription])
@@ -1928,7 +1858,7 @@ instance ToJSON LogMetric where
1928-- /See:/ 'logEntry' smart constructor.
1858-- /See:/ 'logEntry' smart constructor.
1929data LogEntry = LogEntry'
1859data LogEntry = LogEntry'
1930 { _leOperation :: !(Maybe LogEntryOperation)
1860 { _leOperation :: !(Maybe LogEntryOperation)
1931− , _leSeverity :: !(Maybe Text)
1861+ , _leSeverity :: !(Maybe LogEntrySeverity)
1932 , _leTextPayload :: !(Maybe Text)
1862 , _leTextPayload :: !(Maybe Text)
1933 , _leJSONPayload :: !(Maybe LogEntryJSONPayload)
1863 , _leJSONPayload :: !(Maybe LogEntryJSONPayload)
1934 , _leHTTPRequest :: !(Maybe HTTPRequest)
1864 , _leHTTPRequest :: !(Maybe HTTPRequest)
@@ -1937,7 +1867,7 @@ data LogEntry = LogEntry'
1937 , _leLabels :: !(Maybe LogEntryLabels)
1867 , _leLabels :: !(Maybe LogEntryLabels)
1938 , _leProtoPayload :: !(Maybe LogEntryProtoPayload)
1868 , _leProtoPayload :: !(Maybe LogEntryProtoPayload)
1939 , _leLogName :: !(Maybe Text)
1869 , _leLogName :: !(Maybe Text)
1940− , _leTimestamp :: !(Maybe Text)
1870+ , _leTimestamp :: !(Maybe DateTime')
1941 } deriving (Eq,Show,Data,Typeable,Generic)
1871 } deriving (Eq,Show,Data,Typeable,Generic)
1943-- | Creates a value of 'LogEntry' with the minimum fields required to make a request.
1873-- | Creates a value of 'LogEntry' with the minimum fields required to make a request.
@@ -1990,7 +1920,7 @@ leOperation
1991-- | Optional. The severity of the log entry. The default value is
1921-- | Optional. The severity of the log entry. The default value is
1992-- \`LogSeverity.DEFAULT\`.
1922-- \`LogSeverity.DEFAULT\`.
1993−leSeverity :: Lens' LogEntry (Maybe Text)
1923+leSeverity :: Lens' LogEntry (Maybe LogEntrySeverity)
1994leSeverity
1924leSeverity
1995 = lens _leSeverity (\ s a -> s{_leSeverity = a})
1925 = lens _leSeverity (\ s a -> s{_leSeverity = a})
@@ -2023,9 +1953,9 @@ leResource
2023 = lens _leResource (\ s a -> s{_leResource = a})
1953 = lens _leResource (\ s a -> s{_leResource = a})
2025-- | Optional. A unique ID for the log entry. If you provide this field, the
1955-- | Optional. A unique ID for the log entry. If you provide this field, the
2026−-- logging service considers other log entries in the same log with the
1956+-- logging service considers other log entries in the same project with the
2027−-- same ID as duplicates which can be removed. If omitted, Cloud Logging
1957+-- same ID as duplicates which can be removed. If omitted, Stackdriver
2028−-- will generate a unique ID for this log entry.
1958+-- Logging will generate a unique ID for this log entry.
2029leInsertId :: Lens' LogEntry (Maybe Text)
1959leInsertId :: Lens' LogEntry (Maybe Text)
2030leInsertId
1960leInsertId
2031 = lens _leInsertId (\ s a -> s{_leInsertId = a})
1961 = lens _leInsertId (\ s a -> s{_leInsertId = a})
@@ -2035,17 +1965,17 @@ leInsertId
2035leLabels :: Lens' LogEntry (Maybe LogEntryLabels)
1965leLabels :: Lens' LogEntry (Maybe LogEntryLabels)
2036leLabels = lens _leLabels (\ s a -> s{_leLabels = a})
1966leLabels = lens _leLabels (\ s a -> s{_leLabels = a})
2038−-- | The log entry payload, represented as a protocol buffer. You can only
1968+-- | The log entry payload, represented as a protocol buffer. Some Google
2039−-- use \`protoPayload\` values that belong to a set of approved types.
1969+-- Cloud Platform services use this field for their log entry payloads.
2040leProtoPayload :: Lens' LogEntry (Maybe LogEntryProtoPayload)
1970leProtoPayload :: Lens' LogEntry (Maybe LogEntryProtoPayload)
2041leProtoPayload
1971leProtoPayload
2042 = lens _leProtoPayload
1972 = lens _leProtoPayload
2043 (\ s a -> s{_leProtoPayload = a})
1973 (\ s a -> s{_leProtoPayload = a})
2045-- | Required. The resource name of the log to which this log entry belongs.
1975-- | Required. The resource name of the log to which this log entry belongs.
2046−-- The format of the name is \`\"projects\/ \/logs\/\"\`. Examples:
1976+-- The format of the name is \`\"projects\/\/logs\/\"\`. Examples:
2047-- \`\"projects\/my-projectid\/logs\/syslog\"\`,
1977-- \`\"projects\/my-projectid\/logs\/syslog\"\`,
2048−-- \`\"projects\/1234567890\/logs\/library.googleapis.com%2Fbook_log\"\`.
1978+-- \`\"projects\/my-projectid\/logs\/library.googleapis.com%2Fbook_log\"\`.
2049-- The log ID part of resource name must be less than 512 characters long
1979-- The log ID part of resource name must be less than 512 characters long
2050-- and can only include the following characters: upper and lower case
1980-- and can only include the following characters: upper and lower case
2051-- alphanumeric characters: [A-Za-z0-9]; and punctuation characters:
1981-- alphanumeric characters: [A-Za-z0-9]; and punctuation characters:
@@ -2056,10 +1986,12 @@ leLogName
2056 = lens _leLogName (\ s a -> s{_leLogName = a})
1986 = lens _leLogName (\ s a -> s{_leLogName = a})
2058-- | Optional. The time the event described by the log entry occurred. If
1988-- | Optional. The time the event described by the log entry occurred. If
2059−-- omitted, Cloud Logging will use the time the log entry is written.
1989+-- omitted, Stackdriver Logging will use the time the log entry is
2060−leTimestamp :: Lens' LogEntry (Maybe Text)
1991+leTimestamp :: Lens' LogEntry (Maybe UTCTime)
2061leTimestamp
1992leTimestamp
2062− = lens _leTimestamp (\ s a -> s{_leTimestamp = a})
1993+ = lens _leTimestamp (\ s a -> s{_leTimestamp = a}) .
2064instance FromJSON LogEntry where
1996instance FromJSON LogEntry where
2065 parseJSON
1997 parseJSON