@@ -20,11 +20,19 @@ module Network.Google.Logging.Types.Product where
2020import Network.Google.Logging.Types.Sum
2121import Network.Google.Prelude
2222
23−-- | A description of a type of monitored resource.
23+-- | An object that describes the schema of a MonitoredResource object using
24+-- a type name and a set of labels. For example, the monitored resource
25+-- 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.
2431--
2532-- /See:/ 'monitoredResourceDescriptor' smart constructor.
2633data MonitoredResourceDescriptor = MonitoredResourceDescriptor'
27− { _mrdDisplayName :: !(Maybe Text)
34+ { _mrdName :: !(Maybe Text)
35+ , _mrdDisplayName :: !(Maybe Text)
2836 , _mrdLabels :: !(Maybe [LabelDescriptor])
2937 , _mrdType :: !(Maybe Text)
3038 , _mrdDescription :: !(Maybe Text)
@@ -34,6 +42,8 @@ data MonitoredResourceDescriptor = MonitoredResourceDescriptor'
3442--
3543-- Use one of the following lenses to modify other fields as desired:
3644--
45+-- * 'mrdName'
46+--
3747-- * 'mrdDisplayName'
3848--
3949-- * 'mrdLabels'
@@ -45,35 +55,47 @@ monitoredResourceDescriptor
4555 :: MonitoredResourceDescriptor
4656monitoredResourceDescriptor =
4757 MonitoredResourceDescriptor'
48− { _mrdDisplayName = Nothing
58+ { _mrdName = Nothing
59+ , _mrdDisplayName = Nothing
4960 , _mrdLabels = Nothing
5061 , _mrdType = Nothing
5162 , _mrdDescription = Nothing
5263 }
5364
54−-- | A concise name for the monitored resource type, which is displayed in
55−-- user interfaces. For example, \`\"Cloud SQL Database\"\`.
65+-- | 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}\"\`.
71+mrdName :: Lens' MonitoredResourceDescriptor (Maybe Text)
72+mrdName = lens _mrdName (\ s a -> s{_mrdName = a})
73+
74+-- | Optional. A concise name for the monitored resource type that might be
75+-- displayed in user interfaces. For example, \`\"Google Cloud SQL
76+-- Database\"\`.
5677mrdDisplayName :: Lens' MonitoredResourceDescriptor (Maybe Text)
5778mrdDisplayName
5879 = lens _mrdDisplayName
5980 (\ s a -> s{_mrdDisplayName = a})
6081
61−-- | A set of labels that can be used to describe instances of this monitored
62−-- resource type. For example, Cloud SQL databases can be labeled with
63−-- their \`\"database_id\"\` and their \`\"zone\"\`.
82+-- | Required. A set of labels used to describe instances of this monitored
83+-- resource type. For example, an individual Google Cloud SQL database is
84+-- identified by values for the labels \`\"database_id\"\` and
85+-- \`\"zone\"\`.
6486mrdLabels :: Lens' MonitoredResourceDescriptor [LabelDescriptor]
6587mrdLabels
6688 = lens _mrdLabels (\ s a -> s{_mrdLabels = a}) .
6789 _Default
6890 . _Coerce
6991
70−-- | The monitored resource type. For example, the type
92+-- | Required. The monitored resource type. For example, the type
7193-- \`\"cloudsql_database\"\` represents databases in Google Cloud SQL.
7294mrdType :: Lens' MonitoredResourceDescriptor (Maybe Text)
7395mrdType = lens _mrdType (\ s a -> s{_mrdType = a})
7496
75−-- | A detailed description of the monitored resource type, which is used in
76−-- documentation.
97+-- | Optional. A detailed description of the monitored resource type that
98+-- might be used in documentation.
7799mrdDescription :: Lens' MonitoredResourceDescriptor (Maybe Text)
78100mrdDescription
79101 = lens _mrdDescription
@@ -84,7 +106,8 @@ instance FromJSON MonitoredResourceDescriptor where
84106 = withObject "MonitoredResourceDescriptor"
85107 (\ o ->
86108 MonitoredResourceDescriptor' <$>
87− (o .:? "displayName") <*> (o .:? "labels" .!= mempty)
109+ (o .:? "name") <*> (o .:? "displayName") <*>
110+ (o .:? "labels" .!= mempty)
88111 <*> (o .:? "type")
89112 <*> (o .:? "description"))
90113
@@ -92,17 +115,116 @@ instance ToJSON MonitoredResourceDescriptor where
92115 toJSON MonitoredResourceDescriptor'{..}
93116 = object
94117 (catMaybes
95− [("displayName" .=) <$> _mrdDisplayName,
118+ [("name" .=) <$> _mrdName,
119+ ("displayName" .=) <$> _mrdDisplayName,
96120 ("labels" .=) <$> _mrdLabels,
97121 ("type" .=) <$> _mrdType,
98122 ("description" .=) <$> _mrdDescription])
99123
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.
159+--
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)
166+
167+-- | Creates a value of 'Status' with the minimum fields required to make a request.
168+--
169+-- Use one of the following lenses to modify other fields as desired:
170+--
171+-- * 'sDetails'
172+--
173+-- * 'sCode'
174+--
175+-- * 'sMessage'
176+status
177+ :: Status
178+status =
179+ Status'
180+ { _sDetails = Nothing
181+ , _sCode = Nothing
182+ , _sMessage = Nothing
183+ }
184+
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]
188+sDetails
189+ = lens _sDetails (\ s a -> s{_sDetails = a}) .
190+ _Default
191+ . _Coerce
192+
193+-- | The status code, which should be an enum value of google.rpc.Code.
194+sCode :: Lens' Status (Maybe Int32)
195+sCode
196+ = lens _sCode (\ s a -> s{_sCode = a}) .
197+ mapping _Coerce
198+
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})
204+
205+instance FromJSON Status where
206+ parseJSON
207+ = withObject "Status"
208+ (\ o ->
209+ Status' <$>
210+ (o .:? "details" .!= mempty) <*> (o .:? "code") <*>
211+ (o .:? "message"))
212+
213+instance ToJSON Status where
214+ toJSON Status'{..}
215+ = object
216+ (catMaybes
217+ [("details" .=) <$> _sDetails,
218+ ("code" .=) <$> _sCode,
219+ ("message" .=) <$> _sMessage])
220+
100221-- | Result returned from \`ListLogEntries\`.
101222--
102223-- /See:/ 'listLogEntriesResponse' smart constructor.
103224data ListLogEntriesResponse = ListLogEntriesResponse'
104− { _llerNextPageToken :: !(Maybe Text)
105− , _llerEntries :: !(Maybe [LogEntry])
225+ { _llerNextPageToken :: !(Maybe Text)
226+ , _llerEntries :: !(Maybe [LogEntry])
227+ , _llerProjectIdErrors :: !(Maybe ListLogEntriesResponseProjectIdErrors)
106228 } deriving (Eq,Show,Data,Typeable,Generic)
107229
108230-- | Creates a value of 'ListLogEntriesResponse' with the minimum fields required to make a request.
@@ -112,17 +234,20 @@ data ListLogEntriesResponse = ListLogEntriesResponse'
112234-- * 'llerNextPageToken'
113235--
114236-- * 'llerEntries'
237+--
238+-- * 'llerProjectIdErrors'
115239listLogEntriesResponse
116240 :: ListLogEntriesResponse
117241listLogEntriesResponse =
118242 ListLogEntriesResponse'
119243 { _llerNextPageToken = Nothing
120244 , _llerEntries = Nothing
245+ , _llerProjectIdErrors = Nothing
121246 }
122247
123248-- | If there are more results than were returned, then \`nextPageToken\` is
124−-- given a value in the response. To get the next batch of results, call
125−-- this method again using the value of \`nextPageToken\` as \`pageToken\`.
249+-- included in the response. To get the next set of results, call this
250+-- method again using the value of \`nextPageToken\` as \`pageToken\`.
126251llerNextPageToken :: Lens' ListLogEntriesResponse (Maybe Text)
127252llerNextPageToken
128253 = lens _llerNextPageToken
@@ -135,26 +260,33 @@ llerEntries
135260 _Default
136261 . _Coerce
137262
263+-- | If partial_success is true, contains the project ids that had errors and
264+-- the associated errors.
265+llerProjectIdErrors :: Lens' ListLogEntriesResponse (Maybe ListLogEntriesResponseProjectIdErrors)
266+llerProjectIdErrors
267+ = lens _llerProjectIdErrors
268+ (\ s a -> s{_llerProjectIdErrors = a})
269+
138270instance FromJSON ListLogEntriesResponse where
139271 parseJSON
140272 = withObject "ListLogEntriesResponse"
141273 (\ o ->
142274 ListLogEntriesResponse' <$>
143275 (o .:? "nextPageToken") <*>
144− (o .:? "entries" .!= mempty))
276+ (o .:? "entries" .!= mempty)
277+ <*> (o .:? "projectIdErrors"))
145278
146279instance ToJSON ListLogEntriesResponse where
147280 toJSON ListLogEntriesResponse'{..}
148281 = object
149282 (catMaybes
150283 [("nextPageToken" .=) <$> _llerNextPageToken,
151− ("entries" .=) <$> _llerEntries])
284+ ("entries" .=) <$> _llerEntries,
285+ ("projectIdErrors" .=) <$> _llerProjectIdErrors])
152286
153−-- | Values for some or all of the labels listed in the associated monitored
154−-- resource descriptor. For example, specify a specific Cloud SQL database
155−-- by supplying values for both the \`\"database_id\"\` and \`\"zone\"\`
156−-- labels. Specify the set of all Cloud SQL databases in a particular
157−-- location by supplying a value for only the \`\"zone\"\` label.
287+-- | Required. Values for all of the labels listed in the associated
288+-- monitored resource descriptor. For example, Cloud SQL databases use the
289+-- labels \`\"database_id\"\` and \`\"zone\"\`.
158290--
159291-- /See:/ 'monitoredResourceLabels' smart constructor.
160292newtype MonitoredResourceLabels = MonitoredResourceLabels'
@@ -219,8 +351,8 @@ llmrMetrics
219351 . _Coerce
220352
221353-- | If there are more results than were returned, then \`nextPageToken\` is
222−-- given a value in the response. To get the next batch of results, call
223−-- this method again using the value of \`nextPageToken\` as \`pageToken\`.
354+-- included in the response. To get the next set of results, call this
355+-- method again using the value of \`nextPageToken\` as \`pageToken\`.
224356llmrNextPageToken :: Lens' ListLogMetricsResponse (Maybe Text)
225357llmrNextPageToken
226358 = lens _llmrNextPageToken
@@ -245,10 +377,11 @@ instance ToJSON ListLogMetricsResponse where
245377--
246378-- /See:/ 'writeLogEntriesRequest' smart constructor.
247379data WriteLogEntriesRequest = WriteLogEntriesRequest'
248− { _wlerEntries :: !(Maybe [LogEntry])
249− , _wlerResource :: !(Maybe MonitoredResource)
250− , _wlerLabels :: !(Maybe WriteLogEntriesRequestLabels)
251− , _wlerLogName :: !(Maybe Text)
380+ { _wlerEntries :: !(Maybe [LogEntry])
381+ , _wlerPartialSuccess :: !(Maybe Bool)
382+ , _wlerResource :: !(Maybe MonitoredResource)
383+ , _wlerLabels :: !(Maybe WriteLogEntriesRequestLabels)
384+ , _wlerLogName :: !(Maybe Text)
252385 } deriving (Eq,Show,Data,Typeable,Generic)
253386
254387-- | Creates a value of 'WriteLogEntriesRequest' with the minimum fields required to make a request.
@@ -257,6 +390,8 @@ data WriteLogEntriesRequest = WriteLogEntriesRequest'
257390--
258391-- * 'wlerEntries'
259392--
393+-- * 'wlerPartialSuccess'
394+--
260395-- * 'wlerResource'
261396--
262397-- * 'wlerLabels'
@@ -267,6 +402,7 @@ writeLogEntriesRequest
267402writeLogEntriesRequest =
268403 WriteLogEntriesRequest'
269404 { _wlerEntries = Nothing
405+ , _wlerPartialSuccess = Nothing
270406 , _wlerResource = Nothing
271407 , _wlerLabels = Nothing
272408 , _wlerLogName = Nothing
@@ -280,6 +416,16 @@ wlerEntries
280416 _Default
281417 . _Coerce
282418
419+-- | Optional. Whether valid entries should be written even if some other
420+-- entries fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any
421+-- entry is not written, the response status will be the error associated
422+-- with one of the failed entries and include error details in the form of
423+-- WriteLogEntriesPartialErrors.
424+wlerPartialSuccess :: Lens' WriteLogEntriesRequest (Maybe Bool)
425+wlerPartialSuccess
426+ = lens _wlerPartialSuccess
427+ (\ s a -> s{_wlerPartialSuccess = a})
428+
283429-- | Optional. A default monitored resource for those log entries in
284430-- \`entries\` that do not specify their own \`resource\`.
285431wlerResource :: Lens' WriteLogEntriesRequest (Maybe MonitoredResource)
@@ -306,7 +452,9 @@ instance FromJSON WriteLogEntriesRequest where
306452 = withObject "WriteLogEntriesRequest"
307453 (\ o ->
308454 WriteLogEntriesRequest' <$>
309− (o .:? "entries" .!= mempty) <*> (o .:? "resource")
455+ (o .:? "entries" .!= mempty) <*>
456+ (o .:? "partialSuccess")
457+ <*> (o .:? "resource")
310458 <*> (o .:? "labels")
311459 <*> (o .:? "logName"))
312460
@@ -315,6 +463,7 @@ instance ToJSON WriteLogEntriesRequest where
315463 = object
316464 (catMaybes
317465 [("entries" .=) <$> _wlerEntries,
466+ ("partialSuccess" .=) <$> _wlerPartialSuccess,
318467 ("resource" .=) <$> _wlerResource,
319468 ("labels" .=) <$> _wlerLabels,
320469 ("logName" .=) <$> _wlerLogName])
@@ -407,8 +556,8 @@ lsrSinks
407556 . _Coerce
408557
409558-- | If there are more results than were returned, then \`nextPageToken\` is
410−-- given a value in the response. To get the next batch of results, call
411−-- this method again using the value of \`nextPageToken\` as \`pageToken\`.
559+-- included in the response. To get the next set of results, call this
560+-- method again using the value of \`nextPageToken\` as \`pageToken\`.
412561lsrNextPageToken :: Lens' ListSinksResponse (Maybe Text)
413562lsrNextPageToken
414563 = lens _lsrNextPageToken
@@ -445,6 +594,7 @@ data RequestLog = RequestLog'
445594 , _rlTaskName :: !(Maybe Text)
446595 , _rlPendingTime :: !(Maybe Text)
447596 , _rlWasLoadingRequest :: !(Maybe Bool)
597+ , _rlFirst :: !(Maybe Bool)
448598 , _rlStartTime :: !(Maybe Text)
449599 , _rlLatency :: !(Maybe Text)
450600 , _rlURLMapEntry :: !(Maybe Text)
@@ -493,6 +643,8 @@ data RequestLog = RequestLog'
493643--
494644-- * 'rlWasLoadingRequest'
495645--
646+-- * 'rlFirst'
647+--
496648-- * 'rlStartTime'
497649--
498650-- * 'rlLatency'
@@ -547,6 +699,7 @@ requestLog =
547699 , _rlTaskName = Nothing
548700 , _rlPendingTime = Nothing
549701 , _rlWasLoadingRequest = Nothing
702+ , _rlFirst = Nothing
550703 , _rlStartTime = Nothing
551704 , _rlLatency = Nothing
552705 , _rlURLMapEntry = Nothing
@@ -634,6 +787,12 @@ rlWasLoadingRequest
634787 = lens _rlWasLoadingRequest
635788 (\ s a -> s{_rlWasLoadingRequest = a})
636789
790+-- | Whether this is the first RequestLog entry for this request. If an
791+-- active request has several RequestLog entries written to Cloud Logging,
792+-- this field will be set for one of them.
793+rlFirst :: Lens' RequestLog (Maybe Bool)
794+rlFirst = lens _rlFirst (\ s a -> s{_rlFirst = a})
795+
637796-- | Time when the request started.
638797rlStartTime :: Lens' RequestLog (Maybe Text)
639798rlStartTime
@@ -768,6 +927,7 @@ instance FromJSON RequestLog where
768927 <*> (o .:? "taskName")
769928 <*> (o .:? "pendingTime")
770929 <*> (o .:? "wasLoadingRequest")
930+ <*> (o .:? "first")
771931 <*> (o .:? "startTime")
772932 <*> (o .:? "latency")
773933 <*> (o .:? "urlMapEntry")
@@ -804,6 +964,7 @@ instance ToJSON RequestLog where
804964 ("taskName" .=) <$> _rlTaskName,
805965 ("pendingTime" .=) <$> _rlPendingTime,
806966 ("wasLoadingRequest" .=) <$> _rlWasLoadingRequest,
967+ ("first" .=) <$> _rlFirst,
807968 ("startTime" .=) <$> _rlStartTime,
808969 ("latency" .=) <$> _rlLatency,
809970 ("urlMapEntry" .=) <$> _rlURLMapEntry,
@@ -922,9 +1083,9 @@ lsDestination
9221083 = lens _lsDestination
9231084 (\ s a -> s{_lsDestination = a})
9241085
925−-- | The log entry version used when exporting log entries from this sink.
926−-- This version does not have to correspond to the version of the log entry
927−-- when it was written to Cloud Logging.
1086+-- | The log entry version to use for this sink\'s exported log entries. This
1087+-- version does not have to correspond to the version of the log entry when
1088+-- it was written to Cloud Logging.
9281089lsOutputVersionFormat :: Lens' LogSink (Maybe Text)
9291090lsOutputVersionFormat
9301091 = lens _lsOutputVersionFormat
@@ -937,11 +1098,12 @@ lsOutputVersionFormat
9371098lsName :: Lens' LogSink (Maybe Text)
9381099lsName = lens _lsName (\ s a -> s{_lsName = a})
9391100
940−-- | An [advanced logs filter](\/logging\/docs\/view\/advanced_filters) that
941−-- defines the log entries to be exported. The filter must be consistent
942−-- with the log entry format designed by the \`outputVersionFormat\`
943−-- parameter, regardless of the format of the log entry that was originally
944−-- written to Cloud Logging. Example: \`\"logName:syslog AND
1101+-- | An [advanced logs filter](\/logging\/docs\/view\/advanced_filters). Only
1102+-- log entries matching that filter are exported. The filter must be
1103+-- consistent with the log entry format specified by the
1104+-- \`outputVersionFormat\` parameter, regardless of the format of the log
1105+-- entry that was originally written to Cloud Logging. Example (V2 format):
1106+-- \`\"logName=projects\/my-projectid\/logs\/syslog AND
9451107-- severity>=ERROR\"\`.
9461108lsFilter :: Lens' LogSink (Maybe Text)
9471109lsFilter = lens _lsFilter (\ s a -> s{_lsFilter = a})
@@ -966,6 +1128,39 @@ instance ToJSON LogSink where
9661128 ("name" .=) <$> _lsName,
9671129 ("filter" .=) <$> _lsFilter])
9681130
1131+--
1132+-- /See:/ 'statusDetailsItem' smart constructor.
1133+newtype StatusDetailsItem = StatusDetailsItem'
1134+ { _sdiAddtional :: HashMap Text JSONValue
1135+ } deriving (Eq,Show,Data,Typeable,Generic)
1136+
1137+-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request.
1138+--
1139+-- Use one of the following lenses to modify other fields as desired:
1140+--
1141+-- * 'sdiAddtional'
1142+statusDetailsItem
1143+ :: HashMap Text JSONValue -- ^ 'sdiAddtional'
1144+ -> StatusDetailsItem
1145+statusDetailsItem pSdiAddtional_ =
1146+ StatusDetailsItem'
1147+ { _sdiAddtional = _Coerce # pSdiAddtional_
1148+ }
1149+
1150+-- | Properties of the object. Contains field \'ype with type URL.
1151+sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
1152+sdiAddtional
1153+ = lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
1154+ . _Coerce
1155+
1156+instance FromJSON StatusDetailsItem where
1157+ parseJSON
1158+ = withObject "StatusDetailsItem"
1159+ (\ o -> StatusDetailsItem' <$> (parseJSONObject o))
1160+
1161+instance ToJSON StatusDetailsItem where
1162+ toJSON = toJSON . _sdiAddtional
1163+
9691164-- | Result returned from ListMonitoredResourceDescriptors.
9701165--
9711166-- /See:/ 'listMonitoredResourceDescriptorsResponse' smart constructor.
@@ -990,7 +1185,7 @@ listMonitoredResourceDescriptorsResponse =
9901185 }
9911186
9921187-- | If there are more results than were returned, then \`nextPageToken\` is
993−-- returned in the response. To get the next batch of results, call this
1188+-- included in the response. To get the next set of results, call this
9941189-- method again using the value of \`nextPageToken\` as \`pageToken\`.
9951190lmrdrNextPageToken :: Lens' ListMonitoredResourceDescriptorsResponse (Maybe Text)
9961191lmrdrNextPageToken
@@ -1028,16 +1223,18 @@ instance ToJSON
10281223--
10291224-- /See:/ 'hTTPRequest' smart constructor.
10301225data HTTPRequest = HTTPRequest'
1031− { _httprStatus :: !(Maybe (Textual Int32))
1032− , _httprRequestURL :: !(Maybe Text)
1033− , _httprRemoteIP :: !(Maybe Text)
1034− , _httprValidatedWithOriginServer :: !(Maybe Bool)
1035− , _httprRequestSize :: !(Maybe (Textual Int64))
1036− , _httprUserAgent :: !(Maybe Text)
1037− , _httprResponseSize :: !(Maybe (Textual Int64))
1038− , _httprRequestMethod :: !(Maybe Text)
1039− , _httprCacheHit :: !(Maybe Bool)
1040− , _httprReferer :: !(Maybe Text)
1226+ { _httprStatus :: !(Maybe (Textual Int32))
1227+ , _httprRequestURL :: !(Maybe Text)
1228+ , _httprCacheFillBytes :: !(Maybe (Textual Int64))
1229+ , _httprRemoteIP :: !(Maybe Text)
1230+ , _httprRequestSize :: !(Maybe (Textual Int64))
1231+ , _httprCacheValidatedWithOriginServer :: !(Maybe Bool)
1232+ , _httprUserAgent :: !(Maybe Text)
1233+ , _httprCacheLookup :: !(Maybe Bool)
1234+ , _httprResponseSize :: !(Maybe (Textual Int64))
1235+ , _httprRequestMethod :: !(Maybe Text)
1236+ , _httprCacheHit :: !(Maybe Bool)
1237+ , _httprReferer :: !(Maybe Text)
10411238 } deriving (Eq,Show,Data,Typeable,Generic)
10421239
10431240-- | Creates a value of 'HTTPRequest' with the minimum fields required to make a request.
@@ -1048,14 +1245,18 @@ data HTTPRequest = HTTPRequest'
10481245--
10491246-- * 'httprRequestURL'
10501247--
1051−-- * 'httprRemoteIP'
1248+-- * 'httprCacheFillBytes'
10521249--
1053−-- * 'httprValidatedWithOriginServer'
1250+-- * 'httprRemoteIP'
10541251--
10551252-- * 'httprRequestSize'
10561253--
1254+-- * 'httprCacheValidatedWithOriginServer'
1255+--
10571256-- * 'httprUserAgent'
10581257--
1258+-- * 'httprCacheLookup'
1259+--
10591260-- * 'httprResponseSize'
10601261--
10611262-- * 'httprRequestMethod'
@@ -1069,10 +1270,12 @@ hTTPRequest =
10691270 HTTPRequest'
10701271 { _httprStatus = Nothing
10711272 , _httprRequestURL = Nothing
1273+ , _httprCacheFillBytes = Nothing
10721274 , _httprRemoteIP = Nothing
1073− , _httprValidatedWithOriginServer = Nothing
10741275 , _httprRequestSize = Nothing
1276+ , _httprCacheValidatedWithOriginServer = Nothing
10751277 , _httprUserAgent = Nothing
1278+ , _httprCacheLookup = Nothing
10761279 , _httprResponseSize = Nothing
10771280 , _httprRequestMethod = Nothing
10781281 , _httprCacheHit = Nothing
@@ -1093,6 +1296,14 @@ httprRequestURL
10931296 = lens _httprRequestURL
10941297 (\ s a -> s{_httprRequestURL = a})
10951298
1299+-- | The number of HTTP response bytes inserted into cache. Set only when a
1300+-- cache fill was attempted.
1301+httprCacheFillBytes :: Lens' HTTPRequest (Maybe Int64)
1302+httprCacheFillBytes
1303+ = lens _httprCacheFillBytes
1304+ (\ s a -> s{_httprCacheFillBytes = a})
1305+ . mapping _Coerce
1306+
10961307-- | The IP address (IPv4 or IPv6) of the client that issued the HTTP
10971308-- request. Examples: \`\"192.168.1.1\"\`,
10981309-- \`\"FE80::0202:B3FF:FE1E:8329\"\`.
@@ -1101,14 +1312,6 @@ httprRemoteIP
11011312 = lens _httprRemoteIP
11021313 (\ s a -> s{_httprRemoteIP = a})
11031314
1104−-- | Whether or not the response was validated with the origin server before
1105−-- being served from cache. This field is only meaningful if \`cache_hit\`
1106−-- is True.
1107−httprValidatedWithOriginServer :: Lens' HTTPRequest (Maybe Bool)
1108−httprValidatedWithOriginServer
1109− = lens _httprValidatedWithOriginServer
1110− (\ s a -> s{_httprValidatedWithOriginServer = a})
1111−
11121315-- | The size of the HTTP request message in bytes, including the request
11131316-- headers and the request body.
11141317httprRequestSize :: Lens' HTTPRequest (Maybe Int64)
@@ -1117,6 +1320,15 @@ httprRequestSize
11171320 (\ s a -> s{_httprRequestSize = a})
11181321 . mapping _Coerce
11191322
1323+-- | Whether or not the response was validated with the origin server before
1324+-- being served from cache. This field is only meaningful if \`cache_hit\`
1325+-- is True.
1326+httprCacheValidatedWithOriginServer :: Lens' HTTPRequest (Maybe Bool)
1327+httprCacheValidatedWithOriginServer
1328+ = lens _httprCacheValidatedWithOriginServer
1329+ (\ s a ->
1330+ s{_httprCacheValidatedWithOriginServer = a})
1331+
11201332-- | The user agent sent by the client. Example: \`\"Mozilla\/4.0
11211333-- (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\"\`.
11221334httprUserAgent :: Lens' HTTPRequest (Maybe Text)
@@ -1124,6 +1336,12 @@ httprUserAgent
11241336 = lens _httprUserAgent
11251337 (\ s a -> s{_httprUserAgent = a})
11261338
1339+-- | Whether or not a cache lookup was attempted.
1340+httprCacheLookup :: Lens' HTTPRequest (Maybe Bool)
1341+httprCacheLookup
1342+ = lens _httprCacheLookup
1343+ (\ s a -> s{_httprCacheLookup = a})
1344+
11271345-- | The size of the HTTP response message sent back to the client, in bytes,
11281346-- including the response headers and the response body.
11291347httprResponseSize :: Lens' HTTPRequest (Maybe Int64)
@@ -1158,10 +1376,12 @@ instance FromJSON HTTPRequest where
11581376 (\ o ->
11591377 HTTPRequest' <$>
11601378 (o .:? "status") <*> (o .:? "requestUrl") <*>
1161− (o .:? "remoteIp")
1162− <*> (o .:? "validatedWithOriginServer")
1379+ (o .:? "cacheFillBytes")
1380+ <*> (o .:? "remoteIp")
11631381 <*> (o .:? "requestSize")
1382+ <*> (o .:? "cacheValidatedWithOriginServer")
11641383 <*> (o .:? "userAgent")
1384+ <*> (o .:? "cacheLookup")
11651385 <*> (o .:? "responseSize")
11661386 <*> (o .:? "requestMethod")
11671387 <*> (o .:? "cacheHit")
@@ -1173,16 +1393,57 @@ instance ToJSON HTTPRequest where
11731393 (catMaybes
11741394 [("status" .=) <$> _httprStatus,
11751395 ("requestUrl" .=) <$> _httprRequestURL,
1396+ ("cacheFillBytes" .=) <$> _httprCacheFillBytes,
11761397 ("remoteIp" .=) <$> _httprRemoteIP,
1177− ("validatedWithOriginServer" .=) <$>
1178− _httprValidatedWithOriginServer,
11791398 ("requestSize" .=) <$> _httprRequestSize,
1399+ ("cacheValidatedWithOriginServer" .=) <$>
1400+ _httprCacheValidatedWithOriginServer,
11801401 ("userAgent" .=) <$> _httprUserAgent,
1402+ ("cacheLookup" .=) <$> _httprCacheLookup,
11811403 ("responseSize" .=) <$> _httprResponseSize,
11821404 ("requestMethod" .=) <$> _httprRequestMethod,
11831405 ("cacheHit" .=) <$> _httprCacheHit,
11841406 ("referer" .=) <$> _httprReferer])
11851407
1408+-- | If partial_success is true, contains the project ids that had errors and
1409+-- the associated errors.
1410+--
1411+-- /See:/ 'listLogEntriesResponseProjectIdErrors' smart constructor.
1412+newtype ListLogEntriesResponseProjectIdErrors = ListLogEntriesResponseProjectIdErrors'
1413+ { _llerpieAddtional :: HashMap Text Status
1414+ } deriving (Eq,Show,Data,Typeable,Generic)
1415+
1416+-- | Creates a value of 'ListLogEntriesResponseProjectIdErrors' with the minimum fields required to make a request.
1417+--
1418+-- Use one of the following lenses to modify other fields as desired:
1419+--
1420+-- * 'llerpieAddtional'
1421+listLogEntriesResponseProjectIdErrors
1422+ :: HashMap Text Status -- ^ 'llerpieAddtional'
1423+ -> ListLogEntriesResponseProjectIdErrors
1424+listLogEntriesResponseProjectIdErrors pLlerpieAddtional_ =
1425+ ListLogEntriesResponseProjectIdErrors'
1426+ { _llerpieAddtional = _Coerce # pLlerpieAddtional_
1427+ }
1428+
1429+llerpieAddtional :: Lens' ListLogEntriesResponseProjectIdErrors (HashMap Text Status)
1430+llerpieAddtional
1431+ = lens _llerpieAddtional
1432+ (\ s a -> s{_llerpieAddtional = a})
1433+ . _Coerce
1434+
1435+instance FromJSON
1436+ ListLogEntriesResponseProjectIdErrors where
1437+ parseJSON
1438+ = withObject "ListLogEntriesResponseProjectIdErrors"
1439+ (\ o ->
1440+ ListLogEntriesResponseProjectIdErrors' <$>
1441+ (parseJSONObject o))
1442+
1443+instance ToJSON ListLogEntriesResponseProjectIdErrors
1444+ where
1445+ toJSON = toJSON . _llerpieAddtional
1446+
11861447-- | Optional. User-defined \`key:value\` items that are added to the
11871448-- \`labels\` field of each log entry in \`entries\`, except when a log
11881449-- entry specifies its own \`key:value\` item with the same key. Example:
@@ -1222,7 +1483,17 @@ instance FromJSON WriteLogEntriesRequestLabels where
12221483instance ToJSON WriteLogEntriesRequestLabels where
12231484 toJSON = toJSON . _wlerlAddtional
12241485
1225−-- | A specific monitored resource or a group of monitored resources.
1486+-- | An object representing a resource that can be used for monitoring,
1487+-- logging, billing, or other purposes. Examples include virtual machine
1488+-- instances, databases, and storage devices such as disks. The \`type\`
1489+-- field identifies a MonitoredResourceDescriptor object that describes the
1490+-- resource\'s schema. Information in the \`labels\` field identifies the
1491+-- actual resource and its attributes according to the schema. For example,
1492+-- a particular Compute Engine VM instance could be represented by the
1493+-- following object, because the MonitoredResourceDescriptor for
1494+-- \`\"gce_instance\"\` has labels \`\"instance_id\"\` and \`\"zone\"\`: {
1495+-- \"type\": \"gce_instance\", \"labels\": { \"instance_id\":
1496+-- \"my-instance\", \"zone\": \"us-central1-a\" }}
12261497--
12271498-- /See:/ 'monitoredResource' smart constructor.
12281499data MonitoredResource = MonitoredResource'
@@ -1245,17 +1516,15 @@ monitoredResource =
12451516 , _mrType = Nothing
12461517 }
12471518
1248−-- | Values for some or all of the labels listed in the associated monitored
1249−-- resource descriptor. For example, specify a specific Cloud SQL database
1250−-- by supplying values for both the \`\"database_id\"\` and \`\"zone\"\`
1251−-- labels. Specify the set of all Cloud SQL databases in a particular
1252−-- location by supplying a value for only the \`\"zone\"\` label.
1519+-- | Required. Values for all of the labels listed in the associated
1520+-- monitored resource descriptor. For example, Cloud SQL databases use the
1521+-- labels \`\"database_id\"\` and \`\"zone\"\`.
12531522mrLabels :: Lens' MonitoredResource (Maybe MonitoredResourceLabels)
12541523mrLabels = lens _mrLabels (\ s a -> s{_mrLabels = a})
12551524
1256−-- | The type of monitored resource. This field must match the value of the
1257−-- \`type\` field in a MonitoredResourceDescriptor object. For example,
1258−-- \`\"cloudsql_database\"\` represents Cloud SQL databases.
1525+-- | Required. The monitored resource type. This field must match the
1526+-- \`type\` field of a MonitoredResourceDescriptor object. For example, the
1527+-- type of a Cloud SQL database is \`\"cloudsql_database\"\`.
12591528mrType :: Lens' MonitoredResource (Maybe Text)
12601529mrType = lens _mrType (\ s a -> s{_mrType = a})
12611530
@@ -1404,11 +1673,12 @@ instance ToJSON LabelDescriptor where
14041673--
14051674-- /See:/ 'listLogEntriesRequest' smart constructor.
14061675data ListLogEntriesRequest = ListLogEntriesRequest'
1407− { _llerOrderBy :: !(Maybe Text)
1408− , _llerProjectIds :: !(Maybe [Text])
1409− , _llerFilter :: !(Maybe Text)
1410− , _llerPageToken :: !(Maybe Text)
1411− , _llerPageSize :: !(Maybe (Textual Int32))
1676+ { _llerOrderBy :: !(Maybe Text)
1677+ , _llerPartialSuccess :: !(Maybe Bool)
1678+ , _llerProjectIds :: !(Maybe [Text])
1679+ , _llerFilter :: !(Maybe Text)
1680+ , _llerPageToken :: !(Maybe Text)
1681+ , _llerPageSize :: !(Maybe (Textual Int32))
14121682 } deriving (Eq,Show,Data,Typeable,Generic)
14131683
14141684-- | Creates a value of 'ListLogEntriesRequest' with the minimum fields required to make a request.
@@ -1417,6 +1687,8 @@ data ListLogEntriesRequest = ListLogEntriesRequest'
14171687--
14181688-- * 'llerOrderBy'
14191689--
1690+-- * 'llerPartialSuccess'
1691+--
14201692-- * 'llerProjectIds'
14211693--
14221694-- * 'llerFilter'
@@ -1429,6 +1701,7 @@ listLogEntriesRequest
14291701listLogEntriesRequest =
14301702 ListLogEntriesRequest'
14311703 { _llerOrderBy = Nothing
1704+ , _llerPartialSuccess = Nothing
14321705 , _llerProjectIds = Nothing
14331706 , _llerFilter = Nothing
14341707 , _llerPageToken = Nothing
@@ -1436,7 +1709,7 @@ listLogEntriesRequest =
14361709 }
14371710
14381711-- | Optional. How the results should be sorted. Presently, the only
1439−-- permitted values are \`\"timestamp\"\` (default) and \`\"timestamp
1712+-- permitted values are \`\"timestamp asc\"\` (default) and \`\"timestamp
14401713-- desc\"\`. The first option returns entries in order of increasing values
14411714-- of \`LogEntry.timestamp\` (oldest first), and the second option returns
14421715-- entries in order of decreasing timestamps (newest first). Entries with
@@ -1445,6 +1718,14 @@ llerOrderBy :: Lens' ListLogEntriesRequest (Maybe Text)
14451718llerOrderBy
14461719 = lens _llerOrderBy (\ s a -> s{_llerOrderBy = a})
14471720
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)
1725+llerPartialSuccess
1726+ = lens _llerPartialSuccess
1727+ (\ s a -> s{_llerPartialSuccess = a})
1728+
14481729-- | Required. One or more project IDs or project numbers from which to
14491730-- retrieve log entries. Examples of a project ID: \`\"my-project-1A\"\`,
14501731-- \`\"1234567890\"\`.
@@ -1464,21 +1745,21 @@ llerFilter :: Lens' ListLogEntriesRequest (Maybe Text)
14641745llerFilter
14651746 = lens _llerFilter (\ s a -> s{_llerFilter = a})
14661747
1467−-- | Optional. If the \`pageToken\` request parameter is supplied, then the
1468−-- next page of results in the set are retrieved. The \`pageToken\`
1469−-- parameter must be set with the value of the \`nextPageToken\` result
1470−-- parameter from the previous request. The values of \`projectIds\`,
1471−-- \`filter\`, and \`orderBy\` must be the same as in the previous request.
1748+-- | Optional. If the \`pageToken\` parameter is supplied, then the next page
1749+-- of results is retrieved. The \`pageToken\` parameter must be set to the
1750+-- value of the \`nextPageToken\` from the previous response. The values of
1751+-- \`projectIds\`, \`filter\`, and \`orderBy\` must be the same as in the
1752+-- previous request.
14721753llerPageToken :: Lens' ListLogEntriesRequest (Maybe Text)
14731754llerPageToken
14741755 = lens _llerPageToken
14751756 (\ s a -> s{_llerPageToken = a})
14761757
1477−-- | Optional. The maximum number of results to return from this request.
1478−-- Fewer results might be returned. You must check for the
1479−-- \`nextPageToken\` result to determine if additional results are
1480−-- available, which you can retrieve by passing the \`nextPageToken\` value
1481−-- in the \`pageToken\` parameter to the next request.
1758+-- | Optional. The maximum number of results to return from this request. You
1759+-- must check for presence of \`nextPageToken\` to determine if additional
1760+-- results are available, which you can retrieve by passing the
1761+-- \`nextPageToken\` value as the \`pageToken\` parameter in the next
1762+-- request.
14821763llerPageSize :: Lens' ListLogEntriesRequest (Maybe Int32)
14831764llerPageSize
14841765 = lens _llerPageSize (\ s a -> s{_llerPageSize = a})
@@ -1489,7 +1770,8 @@ instance FromJSON ListLogEntriesRequest where
14891770 = withObject "ListLogEntriesRequest"
14901771 (\ o ->
14911772 ListLogEntriesRequest' <$>
1492− (o .:? "orderBy") <*> (o .:? "projectIds" .!= mempty)
1773+ (o .:? "orderBy") <*> (o .:? "partialSuccess") <*>
1774+ (o .:? "projectIds" .!= mempty)
14931775 <*> (o .:? "filter")
14941776 <*> (o .:? "pageToken")
14951777 <*> (o .:? "pageSize"))
@@ -1499,6 +1781,7 @@ instance ToJSON ListLogEntriesRequest where
14991781 = object
15001782 (catMaybes
15011783 [("orderBy" .=) <$> _llerOrderBy,
1784+ ("partialSuccess" .=) <$> _llerPartialSuccess,
15021785 ("projectIds" .=) <$> _llerProjectIds,
15031786 ("filter" .=) <$> _llerFilter,
15041787 ("pageToken" .=) <$> _llerPageToken,
@@ -1760,7 +2043,14 @@ leProtoPayload
17602043 (\ s a -> s{_leProtoPayload = a})
17612044
17622045-- | Required. The resource name of the log to which this log entry belongs.
1763−-- The format of the name is \`projects\/\/logs\/
2046+-- The format of the name is \`\"projects\/ \/logs\/\"\`. Examples:
2047+-- \`\"projects\/my-projectid\/logs\/syslog\"\`,
2048+-- \`\"projects\/1234567890\/logs\/library.googleapis.com%2Fbook_log\"\`.
2049+-- 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
2051+-- alphanumeric characters: [A-Za-z0-9]; and punctuation characters:
2052+-- forward-slash, underscore, hyphen, and period. Forward-slash (\`\/\`)
2053+-- characters in the log ID must be URL-encoded.
17642054leLogName :: Lens' LogEntry (Maybe Text)
17652055leLogName
17662056 = lens _leLogName (\ s a -> s{_leLogName = a})