google-api-client 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/README.md +6 -2
  4. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +46 -46
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +15 -15
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +4 -4
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +404 -435
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +107 -121
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +657 -713
  11. data/generated/google/apis/admin_directory_v1.rb +1 -1
  12. data/generated/google/apis/admin_directory_v1/classes.rb +45 -5
  13. data/generated/google/apis/admin_directory_v1/representations.rb +16 -0
  14. data/generated/google/apis/admin_directory_v1/service.rb +4 -1
  15. data/generated/google/apis/admin_reports_v1.rb +1 -1
  16. data/generated/google/apis/adsense_v1_4.rb +1 -1
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +399 -399
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +101 -101
  21. data/generated/google/apis/analyticsreporting_v4/service.rb +10 -10
  22. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  23. data/generated/google/apis/appengine_v1.rb +4 -4
  24. data/generated/google/apis/appengine_v1/classes.rb +747 -747
  25. data/generated/google/apis/appengine_v1/representations.rb +158 -158
  26. data/generated/google/apis/appengine_v1/service.rb +214 -214
  27. data/generated/google/apis/appsactivity_v1.rb +1 -1
  28. data/generated/google/apis/appstate_v1.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +6 -0
  31. data/generated/google/apis/bigquery_v2/representations.rb +2 -0
  32. data/generated/google/apis/calendar_v3.rb +1 -1
  33. data/generated/google/apis/classroom_v1.rb +7 -7
  34. data/generated/google/apis/classroom_v1/classes.rb +517 -515
  35. data/generated/google/apis/classroom_v1/representations.rb +147 -147
  36. data/generated/google/apis/classroom_v1/service.rb +1144 -1143
  37. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  38. data/generated/google/apis/cloudbuild_v1/classes.rb +435 -386
  39. data/generated/google/apis/cloudbuild_v1/representations.rb +133 -115
  40. data/generated/google/apis/cloudbuild_v1/service.rb +148 -148
  41. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  42. data/generated/google/apis/clouddebugger_v2/classes.rb +708 -708
  43. data/generated/google/apis/clouddebugger_v2/representations.rb +146 -146
  44. data/generated/google/apis/clouddebugger_v2/service.rb +124 -124
  45. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  46. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +142 -142
  47. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +29 -29
  48. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +87 -87
  49. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  50. data/generated/google/apis/cloudfunctions_v1/service.rb +6 -6
  51. data/generated/google/apis/cloudkms_v1.rb +1 -1
  52. data/generated/google/apis/cloudkms_v1/classes.rb +692 -675
  53. data/generated/google/apis/cloudkms_v1/representations.rb +144 -144
  54. data/generated/google/apis/cloudkms_v1/service.rb +276 -276
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1168 -1168
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +190 -190
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +311 -288
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +406 -406
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +95 -95
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +242 -234
  63. data/generated/google/apis/cloudtrace_v1.rb +4 -4
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +68 -68
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +22 -22
  66. data/generated/google/apis/cloudtrace_v1/service.rb +48 -48
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +82 -6
  69. data/generated/google/apis/compute_beta/representations.rb +4 -0
  70. data/generated/google/apis/compute_beta/service.rb +1177 -834
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +371 -1
  73. data/generated/google/apis/compute_v1/representations.rb +139 -0
  74. data/generated/google/apis/compute_v1/service.rb +257 -9
  75. data/generated/google/apis/container_v1.rb +1 -1
  76. data/generated/google/apis/container_v1/classes.rb +1122 -826
  77. data/generated/google/apis/container_v1/representations.rb +279 -135
  78. data/generated/google/apis/container_v1/service.rb +440 -98
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +3 -1
  81. data/generated/google/apis/customsearch_v1.rb +1 -1
  82. data/generated/google/apis/dataflow_v1b3.rb +4 -4
  83. data/generated/google/apis/dataflow_v1b3/classes.rb +3423 -3423
  84. data/generated/google/apis/dataflow_v1b3/representations.rb +813 -813
  85. data/generated/google/apis/dataflow_v1b3/service.rb +410 -410
  86. data/generated/google/apis/dataproc_v1.rb +1 -1
  87. data/generated/google/apis/dataproc_v1/classes.rb +450 -431
  88. data/generated/google/apis/dataproc_v1/representations.rb +92 -92
  89. data/generated/google/apis/dataproc_v1/service.rb +200 -200
  90. data/generated/google/apis/datastore_v1.rb +4 -4
  91. data/generated/google/apis/datastore_v1/classes.rb +397 -397
  92. data/generated/google/apis/datastore_v1/representations.rb +100 -100
  93. data/generated/google/apis/datastore_v1/service.rb +62 -62
  94. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  95. data/generated/google/apis/deploymentmanager_v2/classes.rb +79 -3
  96. data/generated/google/apis/deploymentmanager_v2/representations.rb +33 -0
  97. data/generated/google/apis/deploymentmanager_v2/service.rb +15 -20
  98. data/generated/google/apis/dns_v1.rb +1 -1
  99. data/generated/google/apis/dns_v2beta1.rb +1 -1
  100. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  101. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +2 -2
  102. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  103. data/generated/google/apis/drive_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2/service.rb +1 -1
  105. data/generated/google/apis/drive_v3.rb +1 -1
  106. data/generated/google/apis/drive_v3/service.rb +1 -1
  107. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  108. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +87 -87
  109. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +27 -27
  110. data/generated/google/apis/firebaserules_v1/classes.rb +271 -271
  111. data/generated/google/apis/firebaserules_v1/representations.rb +82 -82
  112. data/generated/google/apis/firebaserules_v1/service.rb +151 -151
  113. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  114. data/generated/google/apis/games_management_v1management.rb +1 -1
  115. data/generated/google/apis/games_v1.rb +1 -1
  116. data/generated/google/apis/genomics_v1.rb +9 -9
  117. data/generated/google/apis/genomics_v1/classes.rb +2242 -2242
  118. data/generated/google/apis/genomics_v1/representations.rb +306 -306
  119. data/generated/google/apis/genomics_v1/service.rb +1172 -1172
  120. data/generated/google/apis/gmail_v1.rb +1 -1
  121. data/generated/google/apis/iam_v1.rb +1 -1
  122. data/generated/google/apis/iam_v1/classes.rb +243 -243
  123. data/generated/google/apis/iam_v1/representations.rb +79 -79
  124. data/generated/google/apis/iam_v1/service.rb +137 -137
  125. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  126. data/generated/google/apis/identitytoolkit_v3/classes.rb +18 -0
  127. data/generated/google/apis/identitytoolkit_v3/representations.rb +3 -0
  128. data/generated/google/apis/kgsearch_v1/classes.rb +9 -9
  129. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  130. data/generated/google/apis/kgsearch_v1/service.rb +4 -4
  131. data/generated/google/apis/language_v1.rb +1 -1
  132. data/generated/google/apis/language_v1/classes.rb +451 -451
  133. data/generated/google/apis/language_v1/representations.rb +103 -103
  134. data/generated/google/apis/language_v1/service.rb +49 -49
  135. data/generated/google/apis/language_v1beta1.rb +1 -1
  136. data/generated/google/apis/language_v1beta1/classes.rb +459 -459
  137. data/generated/google/apis/language_v1beta1/representations.rb +110 -110
  138. data/generated/google/apis/language_v1beta1/service.rb +43 -43
  139. data/generated/google/apis/logging_v2.rb +8 -8
  140. data/generated/google/apis/logging_v2/classes.rb +915 -915
  141. data/generated/google/apis/logging_v2/representations.rb +142 -142
  142. data/generated/google/apis/logging_v2/service.rb +415 -415
  143. data/generated/google/apis/logging_v2beta1.rb +8 -8
  144. data/generated/google/apis/logging_v2beta1/classes.rb +905 -905
  145. data/generated/google/apis/logging_v2beta1/representations.rb +150 -150
  146. data/generated/google/apis/logging_v2beta1/service.rb +221 -221
  147. data/generated/google/apis/manufacturers_v1.rb +1 -1
  148. data/generated/google/apis/manufacturers_v1/classes.rb +334 -315
  149. data/generated/google/apis/manufacturers_v1/representations.rb +99 -87
  150. data/generated/google/apis/manufacturers_v1/service.rb +101 -4
  151. data/generated/google/apis/ml_v1.rb +1 -1
  152. data/generated/google/apis/ml_v1/classes.rb +709 -673
  153. data/generated/google/apis/ml_v1/representations.rb +154 -151
  154. data/generated/google/apis/ml_v1/service.rb +341 -354
  155. data/generated/google/apis/monitoring_v3.rb +6 -6
  156. data/generated/google/apis/monitoring_v3/classes.rb +869 -869
  157. data/generated/google/apis/monitoring_v3/representations.rb +171 -171
  158. data/generated/google/apis/monitoring_v3/service.rb +340 -340
  159. data/generated/google/apis/partners_v2.rb +1 -1
  160. data/generated/google/apis/partners_v2/classes.rb +1569 -1569
  161. data/generated/google/apis/partners_v2/representations.rb +256 -256
  162. data/generated/google/apis/partners_v2/service.rb +530 -530
  163. data/generated/google/apis/people_v1.rb +7 -7
  164. data/generated/google/apis/people_v1/classes.rb +1287 -946
  165. data/generated/google/apis/people_v1/representations.rb +355 -203
  166. data/generated/google/apis/people_v1/service.rb +409 -32
  167. data/generated/google/apis/plus_domains_v1.rb +1 -1
  168. data/generated/google/apis/plus_v1.rb +1 -1
  169. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  170. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +445 -445
  171. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +104 -104
  172. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +241 -241
  173. data/generated/google/apis/pubsub_v1.rb +4 -4
  174. data/generated/google/apis/pubsub_v1/classes.rb +286 -287
  175. data/generated/google/apis/pubsub_v1/representations.rb +80 -80
  176. data/generated/google/apis/pubsub_v1/service.rb +178 -178
  177. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  178. data/generated/google/apis/runtimeconfig_v1/classes.rb +52 -52
  179. data/generated/google/apis/runtimeconfig_v1/representations.rb +15 -15
  180. data/generated/google/apis/runtimeconfig_v1/service.rb +21 -21
  181. data/generated/google/apis/script_v1.rb +4 -4
  182. data/generated/google/apis/script_v1/classes.rb +172 -172
  183. data/generated/google/apis/script_v1/representations.rb +41 -41
  184. data/generated/google/apis/script_v1/service.rb +6 -6
  185. data/generated/google/apis/searchconsole_v1.rb +1 -1
  186. data/generated/google/apis/searchconsole_v1/classes.rb +6 -6
  187. data/generated/google/apis/searchconsole_v1/representations.rb +1 -1
  188. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  189. data/generated/google/apis/servicecontrol_v1/classes.rb +1110 -1110
  190. data/generated/google/apis/servicecontrol_v1/representations.rb +215 -215
  191. data/generated/google/apis/servicecontrol_v1/service.rb +65 -65
  192. data/generated/google/apis/servicemanagement_v1.rb +6 -6
  193. data/generated/google/apis/servicemanagement_v1/classes.rb +3594 -3562
  194. data/generated/google/apis/servicemanagement_v1/representations.rb +564 -562
  195. data/generated/google/apis/servicemanagement_v1/service.rb +253 -253
  196. data/generated/google/apis/serviceuser_v1.rb +1 -1
  197. data/generated/google/apis/serviceuser_v1/classes.rb +2678 -2670
  198. data/generated/google/apis/serviceuser_v1/representations.rb +269 -268
  199. data/generated/google/apis/serviceuser_v1/service.rb +59 -59
  200. data/generated/google/apis/sheets_v4.rb +5 -5
  201. data/generated/google/apis/sheets_v4/classes.rb +5155 -5104
  202. data/generated/google/apis/sheets_v4/representations.rb +957 -940
  203. data/generated/google/apis/sheets_v4/service.rb +175 -175
  204. data/generated/google/apis/slides_v1.rb +1 -1
  205. data/generated/google/apis/slides_v1/classes.rb +2932 -2905
  206. data/generated/google/apis/slides_v1/representations.rb +709 -694
  207. data/generated/google/apis/slides_v1/service.rb +50 -50
  208. data/generated/google/apis/sourcerepo_v1/classes.rb +139 -139
  209. data/generated/google/apis/sourcerepo_v1/representations.rb +40 -40
  210. data/generated/google/apis/sourcerepo_v1/service.rb +61 -61
  211. data/generated/google/apis/spanner_v1.rb +7 -1
  212. data/generated/google/apis/spanner_v1/classes.rb +2362 -2299
  213. data/generated/google/apis/spanner_v1/representations.rb +342 -323
  214. data/generated/google/apis/spanner_v1/service.rb +502 -492
  215. data/generated/google/apis/speech_v1beta1.rb +1 -1
  216. data/generated/google/apis/speech_v1beta1/classes.rb +244 -244
  217. data/generated/google/apis/speech_v1beta1/representations.rb +52 -52
  218. data/generated/google/apis/speech_v1beta1/service.rb +91 -91
  219. data/generated/google/apis/storage_v1.rb +1 -1
  220. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  221. data/generated/google/apis/storagetransfer_v1/classes.rb +784 -781
  222. data/generated/google/apis/storagetransfer_v1/representations.rb +88 -88
  223. data/generated/google/apis/storagetransfer_v1/service.rb +154 -154
  224. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  225. data/generated/google/apis/toolresults_v1beta3/classes.rb +90 -1
  226. data/generated/google/apis/toolresults_v1beta3/representations.rb +18 -0
  227. data/generated/google/apis/translate_v2/classes.rb +107 -107
  228. data/generated/google/apis/translate_v2/representations.rb +49 -49
  229. data/generated/google/apis/translate_v2/service.rb +81 -81
  230. data/generated/google/apis/vision_v1.rb +4 -1
  231. data/generated/google/apis/vision_v1/classes.rb +527 -527
  232. data/generated/google/apis/vision_v1/representations.rb +115 -115
  233. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  234. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  235. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  236. data/generated/google/apis/youtubereporting_v1/classes.rb +124 -124
  237. data/generated/google/apis/youtubereporting_v1/representations.rb +30 -30
  238. data/generated/google/apis/youtubereporting_v1/service.rb +113 -113
  239. data/lib/google/apis/version.rb +1 -1
  240. data/samples/cli/lib/samples/analytics.rb +2 -2
  241. metadata +2 -2
@@ -25,19 +25,19 @@ module Google
25
25
  # @see https://cloud.google.com/logging/docs/
26
26
  module LoggingV2
27
27
  VERSION = 'V2'
28
- REVISION = '20170605'
28
+ REVISION = '20170710'
29
29
 
30
- # View your data across Google Cloud Platform services
31
- AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
32
-
33
- # Administrate log data for your projects
34
- AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
30
+ # Submit log data for your projects
31
+ AUTH_LOGGING_WRITE = 'https://www.googleapis.com/auth/logging.write'
35
32
 
36
33
  # View log data for your projects
37
34
  AUTH_LOGGING_READ = 'https://www.googleapis.com/auth/logging.read'
38
35
 
39
- # Submit log data for your projects
40
- AUTH_LOGGING_WRITE = 'https://www.googleapis.com/auth/logging.write'
36
+ # Administrate log data for your projects
37
+ AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
38
+
39
+ # View your data across Google Cloud Platform services
40
+ AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
41
41
 
42
42
  # View and manage your data across Google Cloud Platform services
43
43
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -22,94 +22,150 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2
24
24
 
25
- # A common proto for logging HTTP requests. Only contains semantics defined by
26
- # the HTTP specification. Product-specific logging information MUST be defined
27
- # in a separate message.
28
- class HttpRequest
25
+ # Result returned from ListLogMetrics.
26
+ class ListLogMetricsResponse
29
27
  include Google::Apis::Core::Hashable
30
28
 
31
- # The request processing latency on the server, from the time the request was
32
- # received until the response was sent.
33
- # Corresponds to the JSON property `latency`
34
- # @return [String]
35
- attr_accessor :latency
29
+ # A list of logs-based metrics.
30
+ # Corresponds to the JSON property `metrics`
31
+ # @return [Array<Google::Apis::LoggingV2::LogMetric>]
32
+ attr_accessor :metrics
36
33
 
37
- # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
38
- # Windows 98; Q312461; .NET CLR 1.0.3705)".
39
- # Corresponds to the JSON property `userAgent`
34
+ # If there might be more results than appear in this response, then
35
+ # nextPageToken is included. To get the next set of results, call this method
36
+ # again using the value of nextPageToken as pageToken.
37
+ # Corresponds to the JSON property `nextPageToken`
40
38
  # @return [String]
41
- attr_accessor :user_agent
39
+ attr_accessor :next_page_token
42
40
 
43
- # The number of HTTP response bytes inserted into cache. Set only when a cache
44
- # fill was attempted.
45
- # Corresponds to the JSON property `cacheFillBytes`
46
- # @return [Fixnum]
47
- attr_accessor :cache_fill_bytes
41
+ def initialize(**args)
42
+ update!(**args)
43
+ end
48
44
 
49
- # The request method. Examples: "GET", "HEAD", "PUT", "POST".
50
- # Corresponds to the JSON property `requestMethod`
51
- # @return [String]
52
- attr_accessor :request_method
45
+ # Update properties of this object
46
+ def update!(**args)
47
+ @metrics = args[:metrics] if args.key?(:metrics)
48
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
49
+ end
50
+ end
53
51
 
54
- # The size of the HTTP request message in bytes, including the request headers
55
- # and the request body.
56
- # Corresponds to the JSON property `requestSize`
57
- # @return [Fixnum]
58
- attr_accessor :request_size
52
+ # An individual entry in a log.
53
+ class LogEntry
54
+ include Google::Apis::Core::Hashable
59
55
 
60
- # The size of the HTTP response message sent back to the client, in bytes,
61
- # including the response headers and the response body.
62
- # Corresponds to the JSON property `responseSize`
63
- # @return [Fixnum]
64
- attr_accessor :response_size
56
+ # Optional. The time the event described by the log entry occurred. If omitted
57
+ # in a new log entry, Stackdriver Logging will insert the time the log entry is
58
+ # received. Stackdriver Logging might reject log entries whose time stamps are
59
+ # more than a couple of hours in the future. Log entries with time stamps in the
60
+ # past are accepted.
61
+ # Corresponds to the JSON property `timestamp`
62
+ # @return [String]
63
+ attr_accessor :timestamp
65
64
 
66
- # The scheme (http, https), the host name, the path and the query portion of the
67
- # URL that was requested. Example: "http://example.com/some/info?color=red".
68
- # Corresponds to the JSON property `requestUrl`
65
+ # Output only. The time the log entry was received by Stackdriver Logging.
66
+ # Corresponds to the JSON property `receiveTimestamp`
69
67
  # @return [String]
70
- attr_accessor :request_url
68
+ attr_accessor :receive_timestamp
71
69
 
72
- # The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
73
- # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
74
- # Corresponds to the JSON property `remoteIp`
70
+ # Required. The resource name of the log to which this log entry belongs:
71
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
72
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
73
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
74
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
75
+ # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
76
+ # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
77
+ # be less than 512 characters long and can only include the following characters:
78
+ # upper and lower case alphanumeric characters, forward-slash, underscore,
79
+ # hyphen, and period.For backward compatibility, if log_name begins with a
80
+ # forward-slash, such as /projects/..., then the log entry is ingested as usual
81
+ # but the forward-slash is removed. Listing the log entry will not show the
82
+ # leading slash and filtering for a log name with a leading slash will never
83
+ # return any results.
84
+ # Corresponds to the JSON property `logName`
75
85
  # @return [String]
76
- attr_accessor :remote_ip
86
+ attr_accessor :log_name
77
87
 
78
- # The IP address (IPv4 or IPv6) of the origin server that the request was sent
79
- # to.
80
- # Corresponds to the JSON property `serverIp`
88
+ # An object representing a resource that can be used for monitoring, logging,
89
+ # billing, or other purposes. Examples include virtual machine instances,
90
+ # databases, and storage devices such as disks. The type field identifies a
91
+ # MonitoredResourceDescriptor object that describes the resource's schema.
92
+ # Information in the labels field identifies the actual resource and its
93
+ # attributes according to the schema. For example, a particular Compute Engine
94
+ # VM instance could be represented by the following object, because the
95
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
96
+ # zone":
97
+ # ` "type": "gce_instance",
98
+ # "labels": ` "instance_id": "12345678901234",
99
+ # "zone": "us-central1-a" ``
100
+ # Corresponds to the JSON property `resource`
101
+ # @return [Google::Apis::LoggingV2::MonitoredResource]
102
+ attr_accessor :resource
103
+
104
+ # A common proto for logging HTTP requests. Only contains semantics defined by
105
+ # the HTTP specification. Product-specific logging information MUST be defined
106
+ # in a separate message.
107
+ # Corresponds to the JSON property `httpRequest`
108
+ # @return [Google::Apis::LoggingV2::HttpRequest]
109
+ attr_accessor :http_request
110
+
111
+ # The log entry payload, represented as a structure that is expressed as a JSON
112
+ # object.
113
+ # Corresponds to the JSON property `jsonPayload`
114
+ # @return [Hash<String,Object>]
115
+ attr_accessor :json_payload
116
+
117
+ # Additional information about a potentially long-running operation with which a
118
+ # log entry is associated.
119
+ # Corresponds to the JSON property `operation`
120
+ # @return [Google::Apis::LoggingV2::LogEntryOperation]
121
+ attr_accessor :operation
122
+
123
+ # Optional. A unique identifier for the log entry. If you provide a value, then
124
+ # Stackdriver Logging considers other log entries in the same project, with the
125
+ # same timestamp, and with the same insert_id to be duplicates which can be
126
+ # removed. If omitted in new log entries, then Stackdriver Logging will insert
127
+ # its own unique identifier. The insert_id is used to order log entries that
128
+ # have the same timestamp value.
129
+ # Corresponds to the JSON property `insertId`
81
130
  # @return [String]
82
- attr_accessor :server_ip
131
+ attr_accessor :insert_id
83
132
 
84
- # Whether or not a cache lookup was attempted.
85
- # Corresponds to the JSON property `cacheLookup`
86
- # @return [Boolean]
87
- attr_accessor :cache_lookup
88
- alias_method :cache_lookup?, :cache_lookup
133
+ # The log entry payload, represented as a Unicode string (UTF-8).
134
+ # Corresponds to the JSON property `textPayload`
135
+ # @return [String]
136
+ attr_accessor :text_payload
89
137
 
90
- # Whether or not an entity was served from cache (with or without validation).
91
- # Corresponds to the JSON property `cacheHit`
92
- # @return [Boolean]
93
- attr_accessor :cache_hit
94
- alias_method :cache_hit?, :cache_hit
138
+ # The log entry payload, represented as a protocol buffer. Some Google Cloud
139
+ # Platform services use this field for their log entry payloads.
140
+ # Corresponds to the JSON property `protoPayload`
141
+ # @return [Hash<String,Object>]
142
+ attr_accessor :proto_payload
95
143
 
96
- # Whether or not the response was validated with the origin server before being
97
- # served from cache. This field is only meaningful if cache_hit is True.
98
- # Corresponds to the JSON property `cacheValidatedWithOriginServer`
99
- # @return [Boolean]
100
- attr_accessor :cache_validated_with_origin_server
101
- alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server
144
+ # Optional. Resource name of the trace associated with the log entry, if any. If
145
+ # it contains a relative resource name, the name is assumed to be relative to //
146
+ # tracing.googleapis.com. Example: projects/my-projectid/traces/
147
+ # 06796866738c859f2f19b7cfb3214824
148
+ # Corresponds to the JSON property `trace`
149
+ # @return [String]
150
+ attr_accessor :trace
102
151
 
103
- # The response code indicating the status of response. Examples: 200, 404.
104
- # Corresponds to the JSON property `status`
105
- # @return [Fixnum]
106
- attr_accessor :status
152
+ # Optional. A set of user-defined (key, value) data that provides additional
153
+ # information about the log entry.
154
+ # Corresponds to the JSON property `labels`
155
+ # @return [Hash<String,String>]
156
+ attr_accessor :labels
107
157
 
108
- # The referer URL of the request, as defined in HTTP/1.1 Header Field
109
- # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
110
- # Corresponds to the JSON property `referer`
158
+ # Optional. The severity of the log entry. The default value is LogSeverity.
159
+ # DEFAULT.
160
+ # Corresponds to the JSON property `severity`
111
161
  # @return [String]
112
- attr_accessor :referer
162
+ attr_accessor :severity
163
+
164
+ # Additional information about the source code location that produced the log
165
+ # entry.
166
+ # Corresponds to the JSON property `sourceLocation`
167
+ # @return [Google::Apis::LoggingV2::LogEntrySourceLocation]
168
+ attr_accessor :source_location
113
169
 
114
170
  def initialize(**args)
115
171
  update!(**args)
@@ -117,68 +173,65 @@ module Google
117
173
 
118
174
  # Update properties of this object
119
175
  def update!(**args)
120
- @latency = args[:latency] if args.key?(:latency)
121
- @user_agent = args[:user_agent] if args.key?(:user_agent)
122
- @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
123
- @request_method = args[:request_method] if args.key?(:request_method)
124
- @request_size = args[:request_size] if args.key?(:request_size)
125
- @response_size = args[:response_size] if args.key?(:response_size)
126
- @request_url = args[:request_url] if args.key?(:request_url)
127
- @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
128
- @server_ip = args[:server_ip] if args.key?(:server_ip)
129
- @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
130
- @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
131
- @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
132
- @status = args[:status] if args.key?(:status)
133
- @referer = args[:referer] if args.key?(:referer)
176
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
177
+ @receive_timestamp = args[:receive_timestamp] if args.key?(:receive_timestamp)
178
+ @log_name = args[:log_name] if args.key?(:log_name)
179
+ @resource = args[:resource] if args.key?(:resource)
180
+ @http_request = args[:http_request] if args.key?(:http_request)
181
+ @json_payload = args[:json_payload] if args.key?(:json_payload)
182
+ @operation = args[:operation] if args.key?(:operation)
183
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
184
+ @text_payload = args[:text_payload] if args.key?(:text_payload)
185
+ @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
186
+ @trace = args[:trace] if args.key?(:trace)
187
+ @labels = args[:labels] if args.key?(:labels)
188
+ @severity = args[:severity] if args.key?(:severity)
189
+ @source_location = args[:source_location] if args.key?(:source_location)
134
190
  end
135
191
  end
136
192
 
137
- # Result returned from ListSinks.
138
- class ListSinksResponse
193
+ # A generic empty message that you can re-use to avoid defining duplicated empty
194
+ # messages in your APIs. A typical example is to use it as the request or the
195
+ # response type of an API method. For instance:
196
+ # service Foo `
197
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
198
+ # `
199
+ # The JSON representation for Empty is empty JSON object ``.
200
+ class Empty
139
201
  include Google::Apis::Core::Hashable
140
202
 
141
- # If there might be more results than appear in this response, then
142
- # nextPageToken is included. To get the next set of results, call the same
143
- # method again using the value of nextPageToken as pageToken.
144
- # Corresponds to the JSON property `nextPageToken`
145
- # @return [String]
146
- attr_accessor :next_page_token
147
-
148
- # A list of sinks.
149
- # Corresponds to the JSON property `sinks`
150
- # @return [Array<Google::Apis::LoggingV2::LogSink>]
151
- attr_accessor :sinks
152
-
153
203
  def initialize(**args)
154
204
  update!(**args)
155
205
  end
156
206
 
157
207
  # Update properties of this object
158
208
  def update!(**args)
159
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
160
- @sinks = args[:sinks] if args.key?(:sinks)
161
209
  end
162
210
  end
163
211
 
164
- # A description of a label.
165
- class LabelDescriptor
212
+ # Specifies a location in a source code file.
213
+ class SourceLocation
166
214
  include Google::Apis::Core::Hashable
167
215
 
168
- # The label key.
169
- # Corresponds to the JSON property `key`
216
+ # Source file name. Depending on the runtime environment, this might be a simple
217
+ # name or a fully-qualified name.
218
+ # Corresponds to the JSON property `file`
170
219
  # @return [String]
171
- attr_accessor :key
220
+ attr_accessor :file
172
221
 
173
- # A human-readable description for the label.
174
- # Corresponds to the JSON property `description`
222
+ # Human-readable name of the function or method being invoked, with optional
223
+ # context such as the class or package name. This information is used in
224
+ # contexts such as the logs viewer, where a file and line number are less
225
+ # meaningful. The format can vary by language. For example: qual.if.ied.Class.
226
+ # method (Java), dir/package.func (Go), function (Python).
227
+ # Corresponds to the JSON property `functionName`
175
228
  # @return [String]
176
- attr_accessor :description
229
+ attr_accessor :function_name
177
230
 
178
- # The type of data that can be assigned to the label.
179
- # Corresponds to the JSON property `valueType`
180
- # @return [String]
181
- attr_accessor :value_type
231
+ # Line within the source file.
232
+ # Corresponds to the JSON property `line`
233
+ # @return [Fixnum]
234
+ attr_accessor :line
182
235
 
183
236
  def initialize(**args)
184
237
  update!(**args)
@@ -186,58 +239,68 @@ module Google
186
239
 
187
240
  # Update properties of this object
188
241
  def update!(**args)
189
- @key = args[:key] if args.key?(:key)
190
- @description = args[:description] if args.key?(:description)
191
- @value_type = args[:value_type] if args.key?(:value_type)
242
+ @file = args[:file] if args.key?(:file)
243
+ @function_name = args[:function_name] if args.key?(:function_name)
244
+ @line = args[:line] if args.key?(:line)
192
245
  end
193
246
  end
194
247
 
195
- # An object that describes the schema of a MonitoredResource object using a type
196
- # name and a set of labels. For example, the monitored resource descriptor for
197
- # Google Compute Engine VM instances has a type of "gce_instance" and specifies
198
- # the use of the labels "instance_id" and "zone" to identify particular VM
199
- # instances.Different APIs can support different monitored resource types. APIs
200
- # generally provide a list method that returns the monitored resource
201
- # descriptors used by the API.
202
- class MonitoredResourceDescriptor
248
+ # The parameters to ListLogEntries.
249
+ class ListLogEntriesRequest
203
250
  include Google::Apis::Core::Hashable
204
251
 
205
- # Optional. The resource name of the monitored resource descriptor: "projects/`
206
- # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of
207
- # the type field in this object and `project_id` is a project ID that provides
208
- # API-specific context for accessing the type. APIs that do not use project
209
- # information can use the resource name format "monitoredResourceDescriptors/`
210
- # type`".
211
- # Corresponds to the JSON property `name`
252
+ # Optional. How the results should be sorted. Presently, the only permitted
253
+ # values are "timestamp asc" (default) and "timestamp desc". The first option
254
+ # returns entries in order of increasing values of LogEntry.timestamp (oldest
255
+ # first), and the second option returns entries in order of decreasing
256
+ # timestamps (newest first). Entries with equal timestamps are returned in order
257
+ # of their insert_id values.
258
+ # Corresponds to the JSON property `orderBy`
212
259
  # @return [String]
213
- attr_accessor :name
260
+ attr_accessor :order_by
214
261
 
215
- # Optional. A concise name for the monitored resource type that might be
216
- # displayed in user interfaces. It should be a Title Cased Noun Phrase, without
217
- # any article or other determiners. For example, "Google Cloud SQL Database".
218
- # Corresponds to the JSON property `displayName`
219
- # @return [String]
220
- attr_accessor :display_name
262
+ # Required. Names of one or more parent resources from which to retrieve log
263
+ # entries:
264
+ # "projects/[PROJECT_ID]"
265
+ # "organizations/[ORGANIZATION_ID]"
266
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
267
+ # "folders/[FOLDER_ID]"
268
+ # Projects listed in the project_ids field are added to this list.
269
+ # Corresponds to the JSON property `resourceNames`
270
+ # @return [Array<String>]
271
+ attr_accessor :resource_names
221
272
 
222
- # Optional. A detailed description of the monitored resource type that might be
223
- # used in documentation.
224
- # Corresponds to the JSON property `description`
273
+ # Optional. A filter that chooses which log entries to return. See Advanced Logs
274
+ # Filters. Only log entries that match the filter are returned. An empty filter
275
+ # matches all log entries in the resources listed in resource_names. Referencing
276
+ # a parent resource that is not listed in resource_names will cause the filter
277
+ # to return no results. The maximum length of the filter is 20000 characters.
278
+ # Corresponds to the JSON property `filter`
225
279
  # @return [String]
226
- attr_accessor :description
280
+ attr_accessor :filter
227
281
 
228
- # Required. The monitored resource type. For example, the type "
229
- # cloudsql_database" represents databases in Google Cloud SQL. The maximum
230
- # length of this value is 256 characters.
231
- # Corresponds to the JSON property `type`
282
+ # Deprecated. Use resource_names instead. One or more project identifiers or
283
+ # project numbers from which to retrieve log entries. Example: "my-project-1A".
284
+ # If present, these project identifiers are converted to resource name format
285
+ # and added to the list of resources in resource_names.
286
+ # Corresponds to the JSON property `projectIds`
287
+ # @return [Array<String>]
288
+ attr_accessor :project_ids
289
+
290
+ # Optional. If present, then retrieve the next batch of results from the
291
+ # preceding call to this method. page_token must be the value of next_page_token
292
+ # from the previous response. The values of other method parameters should be
293
+ # identical to those in the previous call.
294
+ # Corresponds to the JSON property `pageToken`
232
295
  # @return [String]
233
- attr_accessor :type
296
+ attr_accessor :page_token
234
297
 
235
- # Required. A set of labels used to describe instances of this monitored
236
- # resource type. For example, an individual Google Cloud SQL database is
237
- # identified by values for the labels "database_id" and "zone".
238
- # Corresponds to the JSON property `labels`
239
- # @return [Array<Google::Apis::LoggingV2::LabelDescriptor>]
240
- attr_accessor :labels
298
+ # Optional. The maximum number of results to return from this request. Non-
299
+ # positive values are ignored. The presence of next_page_token in the response
300
+ # indicates that more results might be available.
301
+ # Corresponds to the JSON property `pageSize`
302
+ # @return [Fixnum]
303
+ attr_accessor :page_size
241
304
 
242
305
  def initialize(**args)
243
306
  update!(**args)
@@ -245,132 +308,248 @@ module Google
245
308
 
246
309
  # Update properties of this object
247
310
  def update!(**args)
248
- @name = args[:name] if args.key?(:name)
249
- @display_name = args[:display_name] if args.key?(:display_name)
250
- @description = args[:description] if args.key?(:description)
251
- @type = args[:type] if args.key?(:type)
252
- @labels = args[:labels] if args.key?(:labels)
311
+ @order_by = args[:order_by] if args.key?(:order_by)
312
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
313
+ @filter = args[:filter] if args.key?(:filter)
314
+ @project_ids = args[:project_ids] if args.key?(:project_ids)
315
+ @page_token = args[:page_token] if args.key?(:page_token)
316
+ @page_size = args[:page_size] if args.key?(:page_size)
253
317
  end
254
318
  end
255
319
 
256
- # Additional information about the source code location that produced the log
257
- # entry.
258
- class LogEntrySourceLocation
320
+ # Complete log information about a single HTTP request to an App Engine
321
+ # application.
322
+ class RequestLog
259
323
  include Google::Apis::Core::Hashable
260
324
 
261
- # Optional. Source file name. Depending on the runtime environment, this might
262
- # be a simple name or a fully-qualified name.
263
- # Corresponds to the JSON property `file`
325
+ # Latency of the request.
326
+ # Corresponds to the JSON property `latency`
264
327
  # @return [String]
265
- attr_accessor :file
328
+ attr_accessor :latency
266
329
 
267
- # Optional. Human-readable name of the function or method being invoked, with
268
- # optional context such as the class or package name. This information may be
269
- # used in contexts such as the logs viewer, where a file and line number are
270
- # less meaningful. The format can vary by language. For example: qual.if.ied.
271
- # Class.method (Java), dir/package.func (Go), function (Python).
272
- # Corresponds to the JSON property `function`
330
+ # Origin IP address.
331
+ # Corresponds to the JSON property `ip`
273
332
  # @return [String]
274
- attr_accessor :function
275
-
276
- # Optional. Line within the source file. 1-based; 0 indicates no line number
277
- # available.
278
- # Corresponds to the JSON property `line`
279
- # @return [Fixnum]
280
- attr_accessor :line
333
+ attr_accessor :ip
281
334
 
282
- def initialize(**args)
283
- update!(**args)
284
- end
335
+ # Application that handled this request.
336
+ # Corresponds to the JSON property `appId`
337
+ # @return [String]
338
+ attr_accessor :app_id
285
339
 
286
- # Update properties of this object
287
- def update!(**args)
288
- @file = args[:file] if args.key?(:file)
289
- @function = args[:function] if args.key?(:function)
290
- @line = args[:line] if args.key?(:line)
291
- end
292
- end
340
+ # App Engine release version.
341
+ # Corresponds to the JSON property `appEngineRelease`
342
+ # @return [String]
343
+ attr_accessor :app_engine_release
293
344
 
294
- # Result returned from ListLogEntries.
295
- class ListLogEntriesResponse
296
- include Google::Apis::Core::Hashable
345
+ # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
346
+ # Corresponds to the JSON property `method`
347
+ # @return [String]
348
+ attr_accessor :method_prop
297
349
 
298
- # A list of log entries.
299
- # Corresponds to the JSON property `entries`
300
- # @return [Array<Google::Apis::LoggingV2::LogEntry>]
301
- attr_accessor :entries
350
+ # An indication of the relative cost of serving this request.
351
+ # Corresponds to the JSON property `cost`
352
+ # @return [Float]
353
+ attr_accessor :cost
302
354
 
303
- # If there might be more results than those appearing in this response, then
304
- # nextPageToken is included. To get the next set of results, call this method
305
- # again using the value of nextPageToken as pageToken.If a value for
306
- # next_page_token appears and the entries field is empty, it means that the
307
- # search found no log entries so far but it did not have time to search all the
308
- # possible log entries. Retry the method with this value for page_token to
309
- # continue the search. Alternatively, consider speeding up the search by
310
- # changing your filter to specify a single log name or resource type, or to
311
- # narrow the time range of the search.
312
- # Corresponds to the JSON property `nextPageToken`
355
+ # An identifier for the instance that handled the request.
356
+ # Corresponds to the JSON property `instanceId`
313
357
  # @return [String]
314
- attr_accessor :next_page_token
315
-
316
- def initialize(**args)
317
- update!(**args)
318
- end
358
+ attr_accessor :instance_id
319
359
 
320
- # Update properties of this object
321
- def update!(**args)
322
- @entries = args[:entries] if args.key?(:entries)
323
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
324
- end
325
- end
360
+ # Number of CPU megacycles used to process request.
361
+ # Corresponds to the JSON property `megaCycles`
362
+ # @return [Fixnum]
363
+ attr_accessor :mega_cycles
326
364
 
327
- # Application log line emitted while processing a request.
328
- class LogLine
329
- include Google::Apis::Core::Hashable
365
+ # Whether this is the first RequestLog entry for this request. If an active
366
+ # request has several RequestLog entries written to Stackdriver Logging, then
367
+ # this field will be set for one of them.
368
+ # Corresponds to the JSON property `first`
369
+ # @return [Boolean]
370
+ attr_accessor :first
371
+ alias_method :first?, :first
330
372
 
331
- # Approximate time when this log entry was made.
332
- # Corresponds to the JSON property `time`
373
+ # Version of the application that handled this request.
374
+ # Corresponds to the JSON property `versionId`
333
375
  # @return [String]
334
- attr_accessor :time
376
+ attr_accessor :version_id
335
377
 
336
- # Severity of this log entry.
337
- # Corresponds to the JSON property `severity`
378
+ # Module of the application that handled this request.
379
+ # Corresponds to the JSON property `moduleId`
338
380
  # @return [String]
339
- attr_accessor :severity
381
+ attr_accessor :module_id
340
382
 
341
- # App-provided log message.
342
- # Corresponds to the JSON property `logMessage`
383
+ # Time when the request finished.
384
+ # Corresponds to the JSON property `endTime`
343
385
  # @return [String]
344
- attr_accessor :log_message
386
+ attr_accessor :end_time
345
387
 
346
- # Specifies a location in a source code file.
347
- # Corresponds to the JSON property `sourceLocation`
348
- # @return [Google::Apis::LoggingV2::SourceLocation]
349
- attr_accessor :source_location
388
+ # User agent that made the request.
389
+ # Corresponds to the JSON property `userAgent`
390
+ # @return [String]
391
+ attr_accessor :user_agent
350
392
 
351
- def initialize(**args)
352
- update!(**args)
353
- end
393
+ # Whether this was a loading request for the instance.
394
+ # Corresponds to the JSON property `wasLoadingRequest`
395
+ # @return [Boolean]
396
+ attr_accessor :was_loading_request
397
+ alias_method :was_loading_request?, :was_loading_request
354
398
 
355
- # Update properties of this object
356
- def update!(**args)
357
- @time = args[:time] if args.key?(:time)
358
- @severity = args[:severity] if args.key?(:severity)
359
- @log_message = args[:log_message] if args.key?(:log_message)
360
- @source_location = args[:source_location] if args.key?(:source_location)
399
+ # Source code for the application that handled this request. There can be more
400
+ # than one source reference per deployed application if source code is
401
+ # distributed among multiple repositories.
402
+ # Corresponds to the JSON property `sourceReference`
403
+ # @return [Array<Google::Apis::LoggingV2::SourceReference>]
404
+ attr_accessor :source_reference
405
+
406
+ # Size in bytes sent back to client by request.
407
+ # Corresponds to the JSON property `responseSize`
408
+ # @return [Fixnum]
409
+ attr_accessor :response_size
410
+
411
+ # Stackdriver Trace identifier for this request.
412
+ # Corresponds to the JSON property `traceId`
413
+ # @return [String]
414
+ attr_accessor :trace_id
415
+
416
+ # A list of log lines emitted by the application while serving this request.
417
+ # Corresponds to the JSON property `line`
418
+ # @return [Array<Google::Apis::LoggingV2::LogLine>]
419
+ attr_accessor :line
420
+
421
+ # Queue name of the request, in the case of an offline request.
422
+ # Corresponds to the JSON property `taskQueueName`
423
+ # @return [String]
424
+ attr_accessor :task_queue_name
425
+
426
+ # Referrer URL of request.
427
+ # Corresponds to the JSON property `referrer`
428
+ # @return [String]
429
+ attr_accessor :referrer
430
+
431
+ # Globally unique identifier for a request, which is based on the request start
432
+ # time. Request IDs for requests which started later will compare greater as
433
+ # strings than those for requests which started earlier.
434
+ # Corresponds to the JSON property `requestId`
435
+ # @return [String]
436
+ attr_accessor :request_id
437
+
438
+ # The logged-in user who made the request.Most likely, this is the part of the
439
+ # user's email before the @ sign. The field value is the same for different
440
+ # requests from the same user, but different users can have similar names. This
441
+ # information is also available to the application via the App Engine Users API.
442
+ # This field will be populated starting with App Engine 1.9.21.
443
+ # Corresponds to the JSON property `nickname`
444
+ # @return [String]
445
+ attr_accessor :nickname
446
+
447
+ # Time this request spent in the pending request queue.
448
+ # Corresponds to the JSON property `pendingTime`
449
+ # @return [String]
450
+ attr_accessor :pending_time
451
+
452
+ # Contains the path and query portion of the URL that was requested. For example,
453
+ # if the URL was "http://example.com/app?name=val", the resource would be "/app?
454
+ # name=val". The fragment identifier, which is identified by the # character, is
455
+ # not included.
456
+ # Corresponds to the JSON property `resource`
457
+ # @return [String]
458
+ attr_accessor :resource
459
+
460
+ # HTTP response status code. Example: 200, 404.
461
+ # Corresponds to the JSON property `status`
462
+ # @return [Fixnum]
463
+ attr_accessor :status
464
+
465
+ # Task name of the request, in the case of an offline request.
466
+ # Corresponds to the JSON property `taskName`
467
+ # @return [String]
468
+ attr_accessor :task_name
469
+
470
+ # File or class that handled the request.
471
+ # Corresponds to the JSON property `urlMapEntry`
472
+ # @return [String]
473
+ attr_accessor :url_map_entry
474
+
475
+ # If the instance processing this request belongs to a manually scaled module,
476
+ # then this is the 0-based index of the instance. Otherwise, this value is -1.
477
+ # Corresponds to the JSON property `instanceIndex`
478
+ # @return [Fixnum]
479
+ attr_accessor :instance_index
480
+
481
+ # Whether this request is finished or active.
482
+ # Corresponds to the JSON property `finished`
483
+ # @return [Boolean]
484
+ attr_accessor :finished
485
+ alias_method :finished?, :finished
486
+
487
+ # Internet host and port number of the resource being requested.
488
+ # Corresponds to the JSON property `host`
489
+ # @return [String]
490
+ attr_accessor :host
491
+
492
+ # HTTP version of request. Example: "HTTP/1.1".
493
+ # Corresponds to the JSON property `httpVersion`
494
+ # @return [String]
495
+ attr_accessor :http_version
496
+
497
+ # Time when the request started.
498
+ # Corresponds to the JSON property `startTime`
499
+ # @return [String]
500
+ attr_accessor :start_time
501
+
502
+ def initialize(**args)
503
+ update!(**args)
504
+ end
505
+
506
+ # Update properties of this object
507
+ def update!(**args)
508
+ @latency = args[:latency] if args.key?(:latency)
509
+ @ip = args[:ip] if args.key?(:ip)
510
+ @app_id = args[:app_id] if args.key?(:app_id)
511
+ @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
512
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
513
+ @cost = args[:cost] if args.key?(:cost)
514
+ @instance_id = args[:instance_id] if args.key?(:instance_id)
515
+ @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
516
+ @first = args[:first] if args.key?(:first)
517
+ @version_id = args[:version_id] if args.key?(:version_id)
518
+ @module_id = args[:module_id] if args.key?(:module_id)
519
+ @end_time = args[:end_time] if args.key?(:end_time)
520
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
521
+ @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request)
522
+ @source_reference = args[:source_reference] if args.key?(:source_reference)
523
+ @response_size = args[:response_size] if args.key?(:response_size)
524
+ @trace_id = args[:trace_id] if args.key?(:trace_id)
525
+ @line = args[:line] if args.key?(:line)
526
+ @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
527
+ @referrer = args[:referrer] if args.key?(:referrer)
528
+ @request_id = args[:request_id] if args.key?(:request_id)
529
+ @nickname = args[:nickname] if args.key?(:nickname)
530
+ @pending_time = args[:pending_time] if args.key?(:pending_time)
531
+ @resource = args[:resource] if args.key?(:resource)
532
+ @status = args[:status] if args.key?(:status)
533
+ @task_name = args[:task_name] if args.key?(:task_name)
534
+ @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
535
+ @instance_index = args[:instance_index] if args.key?(:instance_index)
536
+ @finished = args[:finished] if args.key?(:finished)
537
+ @host = args[:host] if args.key?(:host)
538
+ @http_version = args[:http_version] if args.key?(:http_version)
539
+ @start_time = args[:start_time] if args.key?(:start_time)
361
540
  end
362
541
  end
363
542
 
364
- # Result returned from ListLogMetrics.
365
- class ListLogMetricsResponse
543
+ # Result returned from ListMonitoredResourceDescriptors.
544
+ class ListMonitoredResourceDescriptorsResponse
366
545
  include Google::Apis::Core::Hashable
367
546
 
368
- # A list of logs-based metrics.
369
- # Corresponds to the JSON property `metrics`
370
- # @return [Array<Google::Apis::LoggingV2::LogMetric>]
371
- attr_accessor :metrics
547
+ # A list of resource descriptors.
548
+ # Corresponds to the JSON property `resourceDescriptors`
549
+ # @return [Array<Google::Apis::LoggingV2::MonitoredResourceDescriptor>]
550
+ attr_accessor :resource_descriptors
372
551
 
373
- # If there might be more results than appear in this response, then
552
+ # If there might be more results than those appearing in this response, then
374
553
  # nextPageToken is included. To get the next set of results, call this method
375
554
  # again using the value of nextPageToken as pageToken.
376
555
  # Corresponds to the JSON property `nextPageToken`
@@ -383,147 +562,81 @@ module Google
383
562
 
384
563
  # Update properties of this object
385
564
  def update!(**args)
386
- @metrics = args[:metrics] if args.key?(:metrics)
565
+ @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
387
566
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
388
567
  end
389
568
  end
390
569
 
391
- # A generic empty message that you can re-use to avoid defining duplicated empty
392
- # messages in your APIs. A typical example is to use it as the request or the
393
- # response type of an API method. For instance:
394
- # service Foo `
395
- # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
396
- # `
397
- # The JSON representation for Empty is empty JSON object ``.
398
- class Empty
570
+ # A reference to a particular snapshot of the source tree used to build and
571
+ # deploy an application.
572
+ class SourceReference
399
573
  include Google::Apis::Core::Hashable
400
574
 
575
+ # Optional. A URI string identifying the repository. Example: "https://github.
576
+ # com/GoogleCloudPlatform/kubernetes.git"
577
+ # Corresponds to the JSON property `repository`
578
+ # @return [String]
579
+ attr_accessor :repository
580
+
581
+ # The canonical and persistent identifier of the deployed revision. Example (git)
582
+ # : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
583
+ # Corresponds to the JSON property `revisionId`
584
+ # @return [String]
585
+ attr_accessor :revision_id
586
+
401
587
  def initialize(**args)
402
588
  update!(**args)
403
589
  end
404
590
 
405
591
  # Update properties of this object
406
592
  def update!(**args)
593
+ @repository = args[:repository] if args.key?(:repository)
594
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
407
595
  end
408
596
  end
409
597
 
410
- # An individual entry in a log.
411
- class LogEntry
598
+ # Result returned from WriteLogEntries. empty
599
+ class WriteLogEntriesResponse
412
600
  include Google::Apis::Core::Hashable
413
601
 
414
- # Optional. A unique identifier for the log entry. If you provide a value, then
415
- # Stackdriver Logging considers other log entries in the same project, with the
416
- # same timestamp, and with the same insert_id to be duplicates which can be
417
- # removed. If omitted in new log entries, then Stackdriver Logging will insert
418
- # its own unique identifier. The insert_id is used to order log entries that
419
- # have the same timestamp value.
420
- # Corresponds to the JSON property `insertId`
421
- # @return [String]
422
- attr_accessor :insert_id
423
-
424
- # Additional information about a potentially long-running operation with which a
425
- # log entry is associated.
426
- # Corresponds to the JSON property `operation`
427
- # @return [Google::Apis::LoggingV2::LogEntryOperation]
428
- attr_accessor :operation
602
+ def initialize(**args)
603
+ update!(**args)
604
+ end
429
605
 
430
- # The log entry payload, represented as a Unicode string (UTF-8).
431
- # Corresponds to the JSON property `textPayload`
432
- # @return [String]
433
- attr_accessor :text_payload
606
+ # Update properties of this object
607
+ def update!(**args)
608
+ end
609
+ end
434
610
 
435
- # The log entry payload, represented as a protocol buffer. Some Google Cloud
436
- # Platform services use this field for their log entry payloads.
437
- # Corresponds to the JSON property `protoPayload`
438
- # @return [Hash<String,Object>]
439
- attr_accessor :proto_payload
611
+ # Additional information about a potentially long-running operation with which a
612
+ # log entry is associated.
613
+ class LogEntryOperation
614
+ include Google::Apis::Core::Hashable
440
615
 
441
- # Optional. Resource name of the trace associated with the log entry, if any. If
442
- # it contains a relative resource name, the name is assumed to be relative to //
443
- # tracing.googleapis.com. Example: projects/my-projectid/traces/
444
- # 06796866738c859f2f19b7cfb3214824
445
- # Corresponds to the JSON property `trace`
616
+ # Optional. An arbitrary operation identifier. Log entries with the same
617
+ # identifier are assumed to be part of the same operation.
618
+ # Corresponds to the JSON property `id`
446
619
  # @return [String]
447
- attr_accessor :trace
620
+ attr_accessor :id
448
621
 
449
- # Optional. A set of user-defined (key, value) data that provides additional
450
- # information about the log entry.
451
- # Corresponds to the JSON property `labels`
452
- # @return [Hash<String,String>]
453
- attr_accessor :labels
622
+ # Optional. Set this to True if this is the first log entry in the operation.
623
+ # Corresponds to the JSON property `first`
624
+ # @return [Boolean]
625
+ attr_accessor :first
626
+ alias_method :first?, :first
454
627
 
455
- # Optional. The severity of the log entry. The default value is LogSeverity.
456
- # DEFAULT.
457
- # Corresponds to the JSON property `severity`
628
+ # Optional. An arbitrary producer identifier. The combination of id and producer
629
+ # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com",
630
+ # "github.com/MyProject/MyApplication".
631
+ # Corresponds to the JSON property `producer`
458
632
  # @return [String]
459
- attr_accessor :severity
633
+ attr_accessor :producer
460
634
 
461
- # Additional information about the source code location that produced the log
462
- # entry.
463
- # Corresponds to the JSON property `sourceLocation`
464
- # @return [Google::Apis::LoggingV2::LogEntrySourceLocation]
465
- attr_accessor :source_location
466
-
467
- # Output only. The time the log entry was received by Stackdriver Logging.
468
- # Corresponds to the JSON property `receiveTimestamp`
469
- # @return [String]
470
- attr_accessor :receive_timestamp
471
-
472
- # Optional. The time the event described by the log entry occurred. If omitted
473
- # in a new log entry, Stackdriver Logging will insert the time the log entry is
474
- # received. Stackdriver Logging might reject log entries whose time stamps are
475
- # more than a couple of hours in the future. Log entries with time stamps in the
476
- # past are accepted.
477
- # Corresponds to the JSON property `timestamp`
478
- # @return [String]
479
- attr_accessor :timestamp
480
-
481
- # Required. The resource name of the log to which this log entry belongs:
482
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
483
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
484
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
485
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
486
- # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/
487
- # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must
488
- # be less than 512 characters long and can only include the following characters:
489
- # upper and lower case alphanumeric characters, forward-slash, underscore,
490
- # hyphen, and period.For backward compatibility, if log_name begins with a
491
- # forward-slash, such as /projects/..., then the log entry is ingested as usual
492
- # but the forward-slash is removed. Listing the log entry will not show the
493
- # leading slash and filtering for a log name with a leading slash will never
494
- # return any results.
495
- # Corresponds to the JSON property `logName`
496
- # @return [String]
497
- attr_accessor :log_name
498
-
499
- # A common proto for logging HTTP requests. Only contains semantics defined by
500
- # the HTTP specification. Product-specific logging information MUST be defined
501
- # in a separate message.
502
- # Corresponds to the JSON property `httpRequest`
503
- # @return [Google::Apis::LoggingV2::HttpRequest]
504
- attr_accessor :http_request
505
-
506
- # An object representing a resource that can be used for monitoring, logging,
507
- # billing, or other purposes. Examples include virtual machine instances,
508
- # databases, and storage devices such as disks. The type field identifies a
509
- # MonitoredResourceDescriptor object that describes the resource's schema.
510
- # Information in the labels field identifies the actual resource and its
511
- # attributes according to the schema. For example, a particular Compute Engine
512
- # VM instance could be represented by the following object, because the
513
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
514
- # zone":
515
- # ` "type": "gce_instance",
516
- # "labels": ` "instance_id": "12345678901234",
517
- # "zone": "us-central1-a" ``
518
- # Corresponds to the JSON property `resource`
519
- # @return [Google::Apis::LoggingV2::MonitoredResource]
520
- attr_accessor :resource
521
-
522
- # The log entry payload, represented as a structure that is expressed as a JSON
523
- # object.
524
- # Corresponds to the JSON property `jsonPayload`
525
- # @return [Hash<String,Object>]
526
- attr_accessor :json_payload
635
+ # Optional. Set this to True if this is the last log entry in the operation.
636
+ # Corresponds to the JSON property `last`
637
+ # @return [Boolean]
638
+ attr_accessor :last
639
+ alias_method :last?, :last
527
640
 
528
641
  def initialize(**args)
529
642
  update!(**args)
@@ -531,46 +644,49 @@ module Google
531
644
 
532
645
  # Update properties of this object
533
646
  def update!(**args)
534
- @insert_id = args[:insert_id] if args.key?(:insert_id)
535
- @operation = args[:operation] if args.key?(:operation)
536
- @text_payload = args[:text_payload] if args.key?(:text_payload)
537
- @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
538
- @trace = args[:trace] if args.key?(:trace)
539
- @labels = args[:labels] if args.key?(:labels)
540
- @severity = args[:severity] if args.key?(:severity)
541
- @source_location = args[:source_location] if args.key?(:source_location)
542
- @receive_timestamp = args[:receive_timestamp] if args.key?(:receive_timestamp)
543
- @timestamp = args[:timestamp] if args.key?(:timestamp)
544
- @log_name = args[:log_name] if args.key?(:log_name)
545
- @http_request = args[:http_request] if args.key?(:http_request)
546
- @resource = args[:resource] if args.key?(:resource)
547
- @json_payload = args[:json_payload] if args.key?(:json_payload)
647
+ @id = args[:id] if args.key?(:id)
648
+ @first = args[:first] if args.key?(:first)
649
+ @producer = args[:producer] if args.key?(:producer)
650
+ @last = args[:last] if args.key?(:last)
548
651
  end
549
652
  end
550
653
 
551
- # Specifies a location in a source code file.
552
- class SourceLocation
654
+ # Describes a logs-based metric. The value of the metric is the number of log
655
+ # entries that match a logs filter in a given time interval.
656
+ class LogMetric
553
657
  include Google::Apis::Core::Hashable
554
658
 
555
- # Source file name. Depending on the runtime environment, this might be a simple
556
- # name or a fully-qualified name.
557
- # Corresponds to the JSON property `file`
659
+ # Output only. The API version that created or updated this metric. The version
660
+ # also dictates the syntax of the filter expression. When a value for this field
661
+ # is missing, the default value of V2 should be assumed.
662
+ # Corresponds to the JSON property `version`
558
663
  # @return [String]
559
- attr_accessor :file
664
+ attr_accessor :version
560
665
 
561
- # Human-readable name of the function or method being invoked, with optional
562
- # context such as the class or package name. This information is used in
563
- # contexts such as the logs viewer, where a file and line number are less
564
- # meaningful. The format can vary by language. For example: qual.if.ied.Class.
565
- # method (Java), dir/package.func (Go), function (Python).
566
- # Corresponds to the JSON property `functionName`
666
+ # Required. An advanced logs filter which is used to match log entries. Example:
667
+ # "resource.type=gae_app AND severity>=ERROR"
668
+ # The maximum length of the filter is 20000 characters.
669
+ # Corresponds to the JSON property `filter`
567
670
  # @return [String]
568
- attr_accessor :function_name
671
+ attr_accessor :filter
569
672
 
570
- # Line within the source file.
571
- # Corresponds to the JSON property `line`
572
- # @return [Fixnum]
573
- attr_accessor :line
673
+ # Required. The client-assigned metric identifier. Examples: "error_count", "
674
+ # nginx/requests".Metric identifiers are limited to 100 characters and can
675
+ # include only the following characters: A-Z, a-z, 0-9, and the special
676
+ # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy
677
+ # of name pieces, and it cannot be the first character of the name.The metric
678
+ # identifier in this field must not be URL-encoded (https://en.wikipedia.org/
679
+ # wiki/Percent-encoding). However, when the metric identifier appears as the [
680
+ # METRIC_ID] part of a metric_name API parameter, then the metric identifier
681
+ # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
682
+ # Corresponds to the JSON property `name`
683
+ # @return [String]
684
+ attr_accessor :name
685
+
686
+ # Optional. A description of this metric, which is used in documentation.
687
+ # Corresponds to the JSON property `description`
688
+ # @return [String]
689
+ attr_accessor :description
574
690
 
575
691
  def initialize(**args)
576
692
  update!(**args)
@@ -578,68 +694,41 @@ module Google
578
694
 
579
695
  # Update properties of this object
580
696
  def update!(**args)
581
- @file = args[:file] if args.key?(:file)
582
- @function_name = args[:function_name] if args.key?(:function_name)
583
- @line = args[:line] if args.key?(:line)
697
+ @version = args[:version] if args.key?(:version)
698
+ @filter = args[:filter] if args.key?(:filter)
699
+ @name = args[:name] if args.key?(:name)
700
+ @description = args[:description] if args.key?(:description)
584
701
  end
585
702
  end
586
703
 
587
- # The parameters to ListLogEntries.
588
- class ListLogEntriesRequest
704
+ # An object representing a resource that can be used for monitoring, logging,
705
+ # billing, or other purposes. Examples include virtual machine instances,
706
+ # databases, and storage devices such as disks. The type field identifies a
707
+ # MonitoredResourceDescriptor object that describes the resource's schema.
708
+ # Information in the labels field identifies the actual resource and its
709
+ # attributes according to the schema. For example, a particular Compute Engine
710
+ # VM instance could be represented by the following object, because the
711
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
712
+ # zone":
713
+ # ` "type": "gce_instance",
714
+ # "labels": ` "instance_id": "12345678901234",
715
+ # "zone": "us-central1-a" ``
716
+ class MonitoredResource
589
717
  include Google::Apis::Core::Hashable
590
718
 
591
- # Optional. The maximum number of results to return from this request. Non-
592
- # positive values are ignored. The presence of next_page_token in the response
593
- # indicates that more results might be available.
594
- # Corresponds to the JSON property `pageSize`
595
- # @return [Fixnum]
596
- attr_accessor :page_size
597
-
598
- # Optional. How the results should be sorted. Presently, the only permitted
599
- # values are "timestamp asc" (default) and "timestamp desc". The first option
600
- # returns entries in order of increasing values of LogEntry.timestamp (oldest
601
- # first), and the second option returns entries in order of decreasing
602
- # timestamps (newest first). Entries with equal timestamps are returned in order
603
- # of their insert_id values.
604
- # Corresponds to the JSON property `orderBy`
605
- # @return [String]
606
- attr_accessor :order_by
607
-
608
- # Required. Names of one or more parent resources from which to retrieve log
609
- # entries:
610
- # "projects/[PROJECT_ID]"
611
- # "organizations/[ORGANIZATION_ID]"
612
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
613
- # "folders/[FOLDER_ID]"
614
- # Projects listed in the project_ids field are added to this list.
615
- # Corresponds to the JSON property `resourceNames`
616
- # @return [Array<String>]
617
- attr_accessor :resource_names
618
-
619
- # Deprecated. Use resource_names instead. One or more project identifiers or
620
- # project numbers from which to retrieve log entries. Example: "my-project-1A".
621
- # If present, these project identifiers are converted to resource name format
622
- # and added to the list of resources in resource_names.
623
- # Corresponds to the JSON property `projectIds`
624
- # @return [Array<String>]
625
- attr_accessor :project_ids
626
-
627
- # Optional. A filter that chooses which log entries to return. See Advanced Logs
628
- # Filters. Only log entries that match the filter are returned. An empty filter
629
- # matches all log entries in the resources listed in resource_names. Referencing
630
- # a parent resource that is not listed in resource_names will cause the filter
631
- # to return no results. The maximum length of the filter is 20000 characters.
632
- # Corresponds to the JSON property `filter`
719
+ # Required. The monitored resource type. This field must match the type field of
720
+ # a MonitoredResourceDescriptor object. For example, the type of a Compute
721
+ # Engine VM instance is gce_instance.
722
+ # Corresponds to the JSON property `type`
633
723
  # @return [String]
634
- attr_accessor :filter
724
+ attr_accessor :type
635
725
 
636
- # Optional. If present, then retrieve the next batch of results from the
637
- # preceding call to this method. page_token must be the value of next_page_token
638
- # from the previous response. The values of other method parameters should be
639
- # identical to those in the previous call.
640
- # Corresponds to the JSON property `pageToken`
641
- # @return [String]
642
- attr_accessor :page_token
726
+ # Required. Values for all of the labels listed in the associated monitored
727
+ # resource descriptor. For example, Compute Engine VM instances use the labels "
728
+ # project_id", "instance_id", and "zone".
729
+ # Corresponds to the JSON property `labels`
730
+ # @return [Hash<String,String>]
731
+ attr_accessor :labels
643
732
 
644
733
  def initialize(**args)
645
734
  update!(**args)
@@ -647,196 +736,179 @@ module Google
647
736
 
648
737
  # Update properties of this object
649
738
  def update!(**args)
650
- @page_size = args[:page_size] if args.key?(:page_size)
651
- @order_by = args[:order_by] if args.key?(:order_by)
652
- @resource_names = args[:resource_names] if args.key?(:resource_names)
653
- @project_ids = args[:project_ids] if args.key?(:project_ids)
654
- @filter = args[:filter] if args.key?(:filter)
655
- @page_token = args[:page_token] if args.key?(:page_token)
739
+ @type = args[:type] if args.key?(:type)
740
+ @labels = args[:labels] if args.key?(:labels)
656
741
  end
657
742
  end
658
743
 
659
- # Complete log information about a single HTTP request to an App Engine
660
- # application.
661
- class RequestLog
744
+ # Describes a sink used to export log entries to one of the following
745
+ # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
746
+ # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
747
+ # The sink must be created within a project, organization, billing account, or
748
+ # folder.
749
+ class LogSink
662
750
  include Google::Apis::Core::Hashable
663
751
 
664
- # Number of CPU megacycles used to process request.
665
- # Corresponds to the JSON property `megaCycles`
666
- # @return [Fixnum]
667
- attr_accessor :mega_cycles
668
-
669
- # Whether this is the first RequestLog entry for this request. If an active
670
- # request has several RequestLog entries written to Stackdriver Logging, then
671
- # this field will be set for one of them.
672
- # Corresponds to the JSON property `first`
673
- # @return [Boolean]
674
- attr_accessor :first
675
- alias_method :first?, :first
676
-
677
- # Version of the application that handled this request.
678
- # Corresponds to the JSON property `versionId`
752
+ # Optional. The log entry format to use for this sink's exported log entries.
753
+ # The v2 format is used by default. The v1 format is deprecated and should be
754
+ # used only as part of a migration effort to v2. See Migration to the v2 API.
755
+ # Corresponds to the JSON property `outputVersionFormat`
679
756
  # @return [String]
680
- attr_accessor :version_id
757
+ attr_accessor :output_version_format
681
758
 
682
- # Module of the application that handled this request.
683
- # Corresponds to the JSON property `moduleId`
684
- # @return [String]
685
- attr_accessor :module_id
686
-
687
- # Time when the request finished.
688
- # Corresponds to the JSON property `endTime`
689
- # @return [String]
690
- attr_accessor :end_time
691
-
692
- # User agent that made the request.
693
- # Corresponds to the JSON property `userAgent`
759
+ # Required. The client-assigned sink identifier, unique within the project.
760
+ # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
761
+ # characters and can include only the following characters: upper and lower-case
762
+ # alphanumeric characters, underscores, hyphens, and periods.
763
+ # Corresponds to the JSON property `name`
694
764
  # @return [String]
695
- attr_accessor :user_agent
765
+ attr_accessor :name
696
766
 
697
- # Whether this was a loading request for the instance.
698
- # Corresponds to the JSON property `wasLoadingRequest`
767
+ # Optional. This field applies only to sinks owned by organizations and folders.
768
+ # If the field is false, the default, only the logs owned by the sink's parent
769
+ # resource are available for export. If the field is true, then logs from all
770
+ # the projects, folders, and billing accounts contained in the sink's parent
771
+ # resource are also available for export. Whether a particular log entry from
772
+ # the children is exported depends on the sink's filter expression. For example,
773
+ # if this field is true, then the filter resource.type=gce_instance would export
774
+ # all Compute Engine VM instance log entries from all projects in the sink's
775
+ # parent. To only export entries from certain child projects, filter on the
776
+ # project part of the log name:
777
+ # logName:("projects/test-project1/" OR "projects/test-project2/") AND
778
+ # resource.type=gce_instance
779
+ # Corresponds to the JSON property `includeChildren`
699
780
  # @return [Boolean]
700
- attr_accessor :was_loading_request
701
- alias_method :was_loading_request?, :was_loading_request
702
-
703
- # Source code for the application that handled this request. There can be more
704
- # than one source reference per deployed application if source code is
705
- # distributed among multiple repositories.
706
- # Corresponds to the JSON property `sourceReference`
707
- # @return [Array<Google::Apis::LoggingV2::SourceReference>]
708
- attr_accessor :source_reference
709
-
710
- # Size in bytes sent back to client by request.
711
- # Corresponds to the JSON property `responseSize`
712
- # @return [Fixnum]
713
- attr_accessor :response_size
714
-
715
- # Stackdriver Trace identifier for this request.
716
- # Corresponds to the JSON property `traceId`
717
- # @return [String]
718
- attr_accessor :trace_id
719
-
720
- # A list of log lines emitted by the application while serving this request.
721
- # Corresponds to the JSON property `line`
722
- # @return [Array<Google::Apis::LoggingV2::LogLine>]
723
- attr_accessor :line
781
+ attr_accessor :include_children
782
+ alias_method :include_children?, :include_children
724
783
 
725
- # Referrer URL of request.
726
- # Corresponds to the JSON property `referrer`
784
+ # Required. The export destination:
785
+ # "storage.googleapis.com/[GCS_BUCKET]"
786
+ # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
787
+ # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
788
+ # The sink's writer_identity, set when the sink is created, must have permission
789
+ # to write to the destination or else the log entries are not exported. For more
790
+ # information, see Exporting Logs With Sinks.
791
+ # Corresponds to the JSON property `destination`
727
792
  # @return [String]
728
- attr_accessor :referrer
793
+ attr_accessor :destination
729
794
 
730
- # Queue name of the request, in the case of an offline request.
731
- # Corresponds to the JSON property `taskQueueName`
795
+ # Optional. An advanced logs filter. The only exported log entries are those
796
+ # that are in the resource owning the sink and that match the filter. The filter
797
+ # must use the log entry format specified by the output_version_format parameter.
798
+ # For example, in the v2 format:
799
+ # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
800
+ # Corresponds to the JSON property `filter`
732
801
  # @return [String]
733
- attr_accessor :task_queue_name
802
+ attr_accessor :filter
734
803
 
735
- # Globally unique identifier for a request, which is based on the request start
736
- # time. Request IDs for requests which started later will compare greater as
737
- # strings than those for requests which started earlier.
738
- # Corresponds to the JSON property `requestId`
804
+ # Optional. The time at which this sink will stop exporting log entries. Log
805
+ # entries are exported only if their timestamp is earlier than the end time. If
806
+ # this field is not supplied, there is no end time. If both a start time and an
807
+ # end time are provided, then the end time must be later than the start time.
808
+ # Corresponds to the JSON property `endTime`
739
809
  # @return [String]
740
- attr_accessor :request_id
810
+ attr_accessor :end_time
741
811
 
742
- # The logged-in user who made the request.Most likely, this is the part of the
743
- # user's email before the @ sign. The field value is the same for different
744
- # requests from the same user, but different users can have similar names. This
745
- # information is also available to the application via the App Engine Users API.
746
- # This field will be populated starting with App Engine 1.9.21.
747
- # Corresponds to the JSON property `nickname`
812
+ # Optional. The time at which this sink will begin exporting log entries. Log
813
+ # entries are exported only if their timestamp is not earlier than the start
814
+ # time. The default value of this field is the time the sink is created or
815
+ # updated.
816
+ # Corresponds to the JSON property `startTime`
748
817
  # @return [String]
749
- attr_accessor :nickname
750
-
751
- # HTTP response status code. Example: 200, 404.
752
- # Corresponds to the JSON property `status`
753
- # @return [Fixnum]
754
- attr_accessor :status
818
+ attr_accessor :start_time
755
819
 
756
- # Contains the path and query portion of the URL that was requested. For example,
757
- # if the URL was "http://example.com/app?name=val", the resource would be "/app?
758
- # name=val". The fragment identifier, which is identified by the # character, is
759
- # not included.
760
- # Corresponds to the JSON property `resource`
820
+ # Output only. An IAM identity&mdash;a service account or group&mdash;under
821
+ # which Stackdriver Logging writes the exported log entries to the sink's
822
+ # destination. This field is set by sinks.create and sinks.update, based on the
823
+ # setting of unique_writer_identity in those methods.Until you grant this
824
+ # identity write-access to the destination, log entry exports from this sink
825
+ # will fail. For more information, see Granting access for a resource. Consult
826
+ # the destination service's documentation to determine the appropriate IAM roles
827
+ # to assign to the identity.
828
+ # Corresponds to the JSON property `writerIdentity`
761
829
  # @return [String]
762
- attr_accessor :resource
830
+ attr_accessor :writer_identity
763
831
 
764
- # Time this request spent in the pending request queue.
765
- # Corresponds to the JSON property `pendingTime`
766
- # @return [String]
767
- attr_accessor :pending_time
832
+ def initialize(**args)
833
+ update!(**args)
834
+ end
768
835
 
769
- # Task name of the request, in the case of an offline request.
770
- # Corresponds to the JSON property `taskName`
771
- # @return [String]
772
- attr_accessor :task_name
836
+ # Update properties of this object
837
+ def update!(**args)
838
+ @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
839
+ @name = args[:name] if args.key?(:name)
840
+ @include_children = args[:include_children] if args.key?(:include_children)
841
+ @destination = args[:destination] if args.key?(:destination)
842
+ @filter = args[:filter] if args.key?(:filter)
843
+ @end_time = args[:end_time] if args.key?(:end_time)
844
+ @start_time = args[:start_time] if args.key?(:start_time)
845
+ @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
846
+ end
847
+ end
773
848
 
774
- # File or class that handled the request.
775
- # Corresponds to the JSON property `urlMapEntry`
776
- # @return [String]
777
- attr_accessor :url_map_entry
849
+ # The parameters to WriteLogEntries.
850
+ class WriteLogEntriesRequest
851
+ include Google::Apis::Core::Hashable
778
852
 
779
- # If the instance processing this request belongs to a manually scaled module,
780
- # then this is the 0-based index of the instance. Otherwise, this value is -1.
781
- # Corresponds to the JSON property `instanceIndex`
782
- # @return [Fixnum]
783
- attr_accessor :instance_index
853
+ # Required. The log entries to write. Values supplied for the fields log_name,
854
+ # resource, and labels in this entries.write request are inserted into those log
855
+ # entries in this list that do not provide their own values.Stackdriver Logging
856
+ # also creates and inserts values for timestamp and insert_id if the entries do
857
+ # not provide them. The created insert_id for the N'th entry in this list will
858
+ # be greater than earlier entries and less than later entries. Otherwise, the
859
+ # order of log entries in this list does not matter.To improve throughput and to
860
+ # avoid exceeding the quota limit for calls to entries.write, you should write
861
+ # multiple log entries at once rather than calling this method for each
862
+ # individual log entry.
863
+ # Corresponds to the JSON property `entries`
864
+ # @return [Array<Google::Apis::LoggingV2::LogEntry>]
865
+ attr_accessor :entries
784
866
 
785
- # Internet host and port number of the resource being requested.
786
- # Corresponds to the JSON property `host`
867
+ # Optional. A default log resource name that is assigned to all log entries in
868
+ # entries that do not specify a value for log_name:
869
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
870
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
871
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
872
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
873
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
874
+ # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
875
+ # 2Factivity". For more information about log names, see LogEntry.
876
+ # Corresponds to the JSON property `logName`
787
877
  # @return [String]
788
- attr_accessor :host
878
+ attr_accessor :log_name
789
879
 
790
- # Whether this request is finished or active.
791
- # Corresponds to the JSON property `finished`
880
+ # Optional. Whether valid entries should be written even if some other entries
881
+ # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
882
+ # written, then the response status is the error associated with one of the
883
+ # failed entries and the response includes error details keyed by the entries'
884
+ # zero-based index in the entries.write method.
885
+ # Corresponds to the JSON property `partialSuccess`
792
886
  # @return [Boolean]
793
- attr_accessor :finished
794
- alias_method :finished?, :finished
795
-
796
- # HTTP version of request. Example: "HTTP/1.1".
797
- # Corresponds to the JSON property `httpVersion`
798
- # @return [String]
799
- attr_accessor :http_version
800
-
801
- # Time when the request started.
802
- # Corresponds to the JSON property `startTime`
803
- # @return [String]
804
- attr_accessor :start_time
805
-
806
- # Latency of the request.
807
- # Corresponds to the JSON property `latency`
808
- # @return [String]
809
- attr_accessor :latency
810
-
811
- # Origin IP address.
812
- # Corresponds to the JSON property `ip`
813
- # @return [String]
814
- attr_accessor :ip
815
-
816
- # Application that handled this request.
817
- # Corresponds to the JSON property `appId`
818
- # @return [String]
819
- attr_accessor :app_id
820
-
821
- # App Engine release version.
822
- # Corresponds to the JSON property `appEngineRelease`
823
- # @return [String]
824
- attr_accessor :app_engine_release
825
-
826
- # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE".
827
- # Corresponds to the JSON property `method`
828
- # @return [String]
829
- attr_accessor :method_prop
887
+ attr_accessor :partial_success
888
+ alias_method :partial_success?, :partial_success
830
889
 
831
- # An indication of the relative cost of serving this request.
832
- # Corresponds to the JSON property `cost`
833
- # @return [Float]
834
- attr_accessor :cost
890
+ # Optional. Default labels that are added to the labels field of all log entries
891
+ # in entries. If a log entry already has a label with the same key as a label in
892
+ # this parameter, then the log entry's label is not changed. See LogEntry.
893
+ # Corresponds to the JSON property `labels`
894
+ # @return [Hash<String,String>]
895
+ attr_accessor :labels
835
896
 
836
- # An identifier for the instance that handled the request.
837
- # Corresponds to the JSON property `instanceId`
838
- # @return [String]
839
- attr_accessor :instance_id
897
+ # An object representing a resource that can be used for monitoring, logging,
898
+ # billing, or other purposes. Examples include virtual machine instances,
899
+ # databases, and storage devices such as disks. The type field identifies a
900
+ # MonitoredResourceDescriptor object that describes the resource's schema.
901
+ # Information in the labels field identifies the actual resource and its
902
+ # attributes according to the schema. For example, a particular Compute Engine
903
+ # VM instance could be represented by the following object, because the
904
+ # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
905
+ # zone":
906
+ # ` "type": "gce_instance",
907
+ # "labels": ` "instance_id": "12345678901234",
908
+ # "zone": "us-central1-a" ``
909
+ # Corresponds to the JSON property `resource`
910
+ # @return [Google::Apis::LoggingV2::MonitoredResource]
911
+ attr_accessor :resource
840
912
 
841
913
  def initialize(**args)
842
914
  update!(**args)
@@ -844,45 +916,24 @@ module Google
844
916
 
845
917
  # Update properties of this object
846
918
  def update!(**args)
847
- @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
848
- @first = args[:first] if args.key?(:first)
849
- @version_id = args[:version_id] if args.key?(:version_id)
850
- @module_id = args[:module_id] if args.key?(:module_id)
851
- @end_time = args[:end_time] if args.key?(:end_time)
852
- @user_agent = args[:user_agent] if args.key?(:user_agent)
853
- @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request)
854
- @source_reference = args[:source_reference] if args.key?(:source_reference)
855
- @response_size = args[:response_size] if args.key?(:response_size)
856
- @trace_id = args[:trace_id] if args.key?(:trace_id)
857
- @line = args[:line] if args.key?(:line)
858
- @referrer = args[:referrer] if args.key?(:referrer)
859
- @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
860
- @request_id = args[:request_id] if args.key?(:request_id)
861
- @nickname = args[:nickname] if args.key?(:nickname)
862
- @status = args[:status] if args.key?(:status)
863
- @resource = args[:resource] if args.key?(:resource)
864
- @pending_time = args[:pending_time] if args.key?(:pending_time)
865
- @task_name = args[:task_name] if args.key?(:task_name)
866
- @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
867
- @instance_index = args[:instance_index] if args.key?(:instance_index)
868
- @host = args[:host] if args.key?(:host)
869
- @finished = args[:finished] if args.key?(:finished)
870
- @http_version = args[:http_version] if args.key?(:http_version)
871
- @start_time = args[:start_time] if args.key?(:start_time)
872
- @latency = args[:latency] if args.key?(:latency)
873
- @ip = args[:ip] if args.key?(:ip)
874
- @app_id = args[:app_id] if args.key?(:app_id)
875
- @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
876
- @method_prop = args[:method_prop] if args.key?(:method_prop)
877
- @cost = args[:cost] if args.key?(:cost)
878
- @instance_id = args[:instance_id] if args.key?(:instance_id)
919
+ @entries = args[:entries] if args.key?(:entries)
920
+ @log_name = args[:log_name] if args.key?(:log_name)
921
+ @partial_success = args[:partial_success] if args.key?(:partial_success)
922
+ @labels = args[:labels] if args.key?(:labels)
923
+ @resource = args[:resource] if args.key?(:resource)
879
924
  end
880
925
  end
881
926
 
882
- # Result returned from ListMonitoredResourceDescriptors.
883
- class ListMonitoredResourceDescriptorsResponse
927
+ # Result returned from ListLogs.
928
+ class ListLogsResponse
884
929
  include Google::Apis::Core::Hashable
885
930
 
931
+ # A list of log names. For example, "projects/my-project/syslog" or "
932
+ # organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
933
+ # Corresponds to the JSON property `logNames`
934
+ # @return [Array<String>]
935
+ attr_accessor :log_names
936
+
886
937
  # If there might be more results than those appearing in this response, then
887
938
  # nextPageToken is included. To get the next set of results, call this method
888
939
  # again using the value of nextPageToken as pageToken.
@@ -890,38 +941,32 @@ module Google
890
941
  # @return [String]
891
942
  attr_accessor :next_page_token
892
943
 
893
- # A list of resource descriptors.
894
- # Corresponds to the JSON property `resourceDescriptors`
895
- # @return [Array<Google::Apis::LoggingV2::MonitoredResourceDescriptor>]
896
- attr_accessor :resource_descriptors
897
-
898
944
  def initialize(**args)
899
945
  update!(**args)
900
946
  end
901
947
 
902
948
  # Update properties of this object
903
949
  def update!(**args)
950
+ @log_names = args[:log_names] if args.key?(:log_names)
904
951
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
905
- @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
906
952
  end
907
953
  end
908
954
 
909
- # A reference to a particular snapshot of the source tree used to build and
910
- # deploy an application.
911
- class SourceReference
955
+ # Result returned from ListSinks.
956
+ class ListSinksResponse
912
957
  include Google::Apis::Core::Hashable
913
958
 
914
- # Optional. A URI string identifying the repository. Example: "https://github.
915
- # com/GoogleCloudPlatform/kubernetes.git"
916
- # Corresponds to the JSON property `repository`
959
+ # If there might be more results than appear in this response, then
960
+ # nextPageToken is included. To get the next set of results, call the same
961
+ # method again using the value of nextPageToken as pageToken.
962
+ # Corresponds to the JSON property `nextPageToken`
917
963
  # @return [String]
918
- attr_accessor :repository
964
+ attr_accessor :next_page_token
919
965
 
920
- # The canonical and persistent identifier of the deployed revision. Example (git)
921
- # : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
922
- # Corresponds to the JSON property `revisionId`
923
- # @return [String]
924
- attr_accessor :revision_id
966
+ # A list of sinks.
967
+ # Corresponds to the JSON property `sinks`
968
+ # @return [Array<Google::Apis::LoggingV2::LogSink>]
969
+ attr_accessor :sinks
925
970
 
926
971
  def initialize(**args)
927
972
  update!(**args)
@@ -929,90 +974,99 @@ module Google
929
974
 
930
975
  # Update properties of this object
931
976
  def update!(**args)
932
- @repository = args[:repository] if args.key?(:repository)
933
- @revision_id = args[:revision_id] if args.key?(:revision_id)
977
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
978
+ @sinks = args[:sinks] if args.key?(:sinks)
934
979
  end
935
980
  end
936
981
 
937
- # Describes a logs-based metric. The value of the metric is the number of log
938
- # entries that match a logs filter in a given time interval.
939
- class LogMetric
982
+ # A common proto for logging HTTP requests. Only contains semantics defined by
983
+ # the HTTP specification. Product-specific logging information MUST be defined
984
+ # in a separate message.
985
+ class HttpRequest
940
986
  include Google::Apis::Core::Hashable
941
987
 
942
- # Required. An advanced logs filter which is used to match log entries. Example:
943
- # "resource.type=gae_app AND severity>=ERROR"
944
- # The maximum length of the filter is 20000 characters.
945
- # Corresponds to the JSON property `filter`
988
+ # The request method. Examples: "GET", "HEAD", "PUT", "POST".
989
+ # Corresponds to the JSON property `requestMethod`
946
990
  # @return [String]
947
- attr_accessor :filter
991
+ attr_accessor :request_method
948
992
 
949
- # Required. The client-assigned metric identifier. Examples: "error_count", "
950
- # nginx/requests".Metric identifiers are limited to 100 characters and can
951
- # include only the following characters: A-Z, a-z, 0-9, and the special
952
- # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy
953
- # of name pieces, and it cannot be the first character of the name.The metric
954
- # identifier in this field must not be URL-encoded (https://en.wikipedia.org/
955
- # wiki/Percent-encoding). However, when the metric identifier appears as the [
956
- # METRIC_ID] part of a metric_name API parameter, then the metric identifier
957
- # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests".
958
- # Corresponds to the JSON property `name`
959
- # @return [String]
960
- attr_accessor :name
993
+ # The size of the HTTP request message in bytes, including the request headers
994
+ # and the request body.
995
+ # Corresponds to the JSON property `requestSize`
996
+ # @return [Fixnum]
997
+ attr_accessor :request_size
961
998
 
962
- # Optional. A description of this metric, which is used in documentation.
963
- # Corresponds to the JSON property `description`
999
+ # The size of the HTTP response message sent back to the client, in bytes,
1000
+ # including the response headers and the response body.
1001
+ # Corresponds to the JSON property `responseSize`
1002
+ # @return [Fixnum]
1003
+ attr_accessor :response_size
1004
+
1005
+ # The scheme (http, https), the host name, the path and the query portion of the
1006
+ # URL that was requested. Example: "http://example.com/some/info?color=red".
1007
+ # Corresponds to the JSON property `requestUrl`
964
1008
  # @return [String]
965
- attr_accessor :description
1009
+ attr_accessor :request_url
966
1010
 
967
- # Output only. The API version that created or updated this metric. The version
968
- # also dictates the syntax of the filter expression. When a value for this field
969
- # is missing, the default value of V2 should be assumed.
970
- # Corresponds to the JSON property `version`
1011
+ # The IP address (IPv4 or IPv6) of the origin server that the request was sent
1012
+ # to.
1013
+ # Corresponds to the JSON property `serverIp`
971
1014
  # @return [String]
972
- attr_accessor :version
1015
+ attr_accessor :server_ip
973
1016
 
974
- def initialize(**args)
975
- update!(**args)
976
- end
1017
+ # The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
1018
+ # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329".
1019
+ # Corresponds to the JSON property `remoteIp`
1020
+ # @return [String]
1021
+ attr_accessor :remote_ip
977
1022
 
978
- # Update properties of this object
979
- def update!(**args)
980
- @filter = args[:filter] if args.key?(:filter)
981
- @name = args[:name] if args.key?(:name)
982
- @description = args[:description] if args.key?(:description)
983
- @version = args[:version] if args.key?(:version)
984
- end
985
- end
1023
+ # Whether or not a cache lookup was attempted.
1024
+ # Corresponds to the JSON property `cacheLookup`
1025
+ # @return [Boolean]
1026
+ attr_accessor :cache_lookup
1027
+ alias_method :cache_lookup?, :cache_lookup
986
1028
 
987
- # Additional information about a potentially long-running operation with which a
988
- # log entry is associated.
989
- class LogEntryOperation
990
- include Google::Apis::Core::Hashable
1029
+ # Whether or not an entity was served from cache (with or without validation).
1030
+ # Corresponds to the JSON property `cacheHit`
1031
+ # @return [Boolean]
1032
+ attr_accessor :cache_hit
1033
+ alias_method :cache_hit?, :cache_hit
991
1034
 
992
- # Optional. Set this to True if this is the last log entry in the operation.
993
- # Corresponds to the JSON property `last`
1035
+ # Whether or not the response was validated with the origin server before being
1036
+ # served from cache. This field is only meaningful if cache_hit is True.
1037
+ # Corresponds to the JSON property `cacheValidatedWithOriginServer`
994
1038
  # @return [Boolean]
995
- attr_accessor :last
996
- alias_method :last?, :last
1039
+ attr_accessor :cache_validated_with_origin_server
1040
+ alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server
997
1041
 
998
- # Optional. An arbitrary operation identifier. Log entries with the same
999
- # identifier are assumed to be part of the same operation.
1000
- # Corresponds to the JSON property `id`
1042
+ # The response code indicating the status of response. Examples: 200, 404.
1043
+ # Corresponds to the JSON property `status`
1044
+ # @return [Fixnum]
1045
+ attr_accessor :status
1046
+
1047
+ # The referer URL of the request, as defined in HTTP/1.1 Header Field
1048
+ # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
1049
+ # Corresponds to the JSON property `referer`
1001
1050
  # @return [String]
1002
- attr_accessor :id
1051
+ attr_accessor :referer
1003
1052
 
1004
- # Optional. An arbitrary producer identifier. The combination of id and producer
1005
- # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com",
1006
- # "github.com/MyProject/MyApplication".
1007
- # Corresponds to the JSON property `producer`
1053
+ # The request processing latency on the server, from the time the request was
1054
+ # received until the response was sent.
1055
+ # Corresponds to the JSON property `latency`
1008
1056
  # @return [String]
1009
- attr_accessor :producer
1057
+ attr_accessor :latency
1010
1058
 
1011
- # Optional. Set this to True if this is the first log entry in the operation.
1012
- # Corresponds to the JSON property `first`
1013
- # @return [Boolean]
1014
- attr_accessor :first
1015
- alias_method :first?, :first
1059
+ # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0;
1060
+ # Windows 98; Q312461; .NET CLR 1.0.3705)".
1061
+ # Corresponds to the JSON property `userAgent`
1062
+ # @return [String]
1063
+ attr_accessor :user_agent
1064
+
1065
+ # The number of HTTP response bytes inserted into cache. Set only when a cache
1066
+ # fill was attempted.
1067
+ # Corresponds to the JSON property `cacheFillBytes`
1068
+ # @return [Fixnum]
1069
+ attr_accessor :cache_fill_bytes
1016
1070
 
1017
1071
  def initialize(**args)
1018
1072
  update!(**args)
@@ -1020,153 +1074,140 @@ module Google
1020
1074
 
1021
1075
  # Update properties of this object
1022
1076
  def update!(**args)
1023
- @last = args[:last] if args.key?(:last)
1024
- @id = args[:id] if args.key?(:id)
1025
- @producer = args[:producer] if args.key?(:producer)
1026
- @first = args[:first] if args.key?(:first)
1077
+ @request_method = args[:request_method] if args.key?(:request_method)
1078
+ @request_size = args[:request_size] if args.key?(:request_size)
1079
+ @response_size = args[:response_size] if args.key?(:response_size)
1080
+ @request_url = args[:request_url] if args.key?(:request_url)
1081
+ @server_ip = args[:server_ip] if args.key?(:server_ip)
1082
+ @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
1083
+ @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup)
1084
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
1085
+ @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server)
1086
+ @status = args[:status] if args.key?(:status)
1087
+ @referer = args[:referer] if args.key?(:referer)
1088
+ @latency = args[:latency] if args.key?(:latency)
1089
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
1090
+ @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes)
1027
1091
  end
1028
1092
  end
1029
1093
 
1030
- # Result returned from WriteLogEntries. empty
1031
- class WriteLogEntriesResponse
1094
+ # A description of a label.
1095
+ class LabelDescriptor
1032
1096
  include Google::Apis::Core::Hashable
1033
1097
 
1098
+ # The label key.
1099
+ # Corresponds to the JSON property `key`
1100
+ # @return [String]
1101
+ attr_accessor :key
1102
+
1103
+ # A human-readable description for the label.
1104
+ # Corresponds to the JSON property `description`
1105
+ # @return [String]
1106
+ attr_accessor :description
1107
+
1108
+ # The type of data that can be assigned to the label.
1109
+ # Corresponds to the JSON property `valueType`
1110
+ # @return [String]
1111
+ attr_accessor :value_type
1112
+
1034
1113
  def initialize(**args)
1035
1114
  update!(**args)
1036
1115
  end
1037
1116
 
1038
1117
  # Update properties of this object
1039
1118
  def update!(**args)
1119
+ @key = args[:key] if args.key?(:key)
1120
+ @description = args[:description] if args.key?(:description)
1121
+ @value_type = args[:value_type] if args.key?(:value_type)
1040
1122
  end
1041
1123
  end
1042
1124
 
1043
- # An object representing a resource that can be used for monitoring, logging,
1044
- # billing, or other purposes. Examples include virtual machine instances,
1045
- # databases, and storage devices such as disks. The type field identifies a
1046
- # MonitoredResourceDescriptor object that describes the resource's schema.
1047
- # Information in the labels field identifies the actual resource and its
1048
- # attributes according to the schema. For example, a particular Compute Engine
1049
- # VM instance could be represented by the following object, because the
1050
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1051
- # zone":
1052
- # ` "type": "gce_instance",
1053
- # "labels": ` "instance_id": "12345678901234",
1054
- # "zone": "us-central1-a" ``
1055
- class MonitoredResource
1125
+ # An object that describes the schema of a MonitoredResource object using a type
1126
+ # name and a set of labels. For example, the monitored resource descriptor for
1127
+ # Google Compute Engine VM instances has a type of "gce_instance" and specifies
1128
+ # the use of the labels "instance_id" and "zone" to identify particular VM
1129
+ # instances.Different APIs can support different monitored resource types. APIs
1130
+ # generally provide a list method that returns the monitored resource
1131
+ # descriptors used by the API.
1132
+ class MonitoredResourceDescriptor
1056
1133
  include Google::Apis::Core::Hashable
1057
1134
 
1058
- # Required. The monitored resource type. This field must match the type field of
1059
- # a MonitoredResourceDescriptor object. For example, the type of a Compute
1060
- # Engine VM instance is gce_instance.
1135
+ # Required. A set of labels used to describe instances of this monitored
1136
+ # resource type. For example, an individual Google Cloud SQL database is
1137
+ # identified by values for the labels "database_id" and "zone".
1138
+ # Corresponds to the JSON property `labels`
1139
+ # @return [Array<Google::Apis::LoggingV2::LabelDescriptor>]
1140
+ attr_accessor :labels
1141
+
1142
+ # Optional. The resource name of the monitored resource descriptor: "projects/`
1143
+ # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of
1144
+ # the type field in this object and `project_id` is a project ID that provides
1145
+ # API-specific context for accessing the type. APIs that do not use project
1146
+ # information can use the resource name format "monitoredResourceDescriptors/`
1147
+ # type`".
1148
+ # Corresponds to the JSON property `name`
1149
+ # @return [String]
1150
+ attr_accessor :name
1151
+
1152
+ # Optional. A detailed description of the monitored resource type that might be
1153
+ # used in documentation.
1154
+ # Corresponds to the JSON property `description`
1155
+ # @return [String]
1156
+ attr_accessor :description
1157
+
1158
+ # Optional. A concise name for the monitored resource type that might be
1159
+ # displayed in user interfaces. It should be a Title Cased Noun Phrase, without
1160
+ # any article or other determiners. For example, "Google Cloud SQL Database".
1161
+ # Corresponds to the JSON property `displayName`
1162
+ # @return [String]
1163
+ attr_accessor :display_name
1164
+
1165
+ # Required. The monitored resource type. For example, the type "
1166
+ # cloudsql_database" represents databases in Google Cloud SQL. The maximum
1167
+ # length of this value is 256 characters.
1061
1168
  # Corresponds to the JSON property `type`
1062
1169
  # @return [String]
1063
1170
  attr_accessor :type
1064
1171
 
1065
- # Required. Values for all of the labels listed in the associated monitored
1066
- # resource descriptor. For example, Compute Engine VM instances use the labels "
1067
- # project_id", "instance_id", and "zone".
1068
- # Corresponds to the JSON property `labels`
1069
- # @return [Hash<String,String>]
1070
- attr_accessor :labels
1071
-
1072
1172
  def initialize(**args)
1073
1173
  update!(**args)
1074
1174
  end
1075
1175
 
1076
1176
  # Update properties of this object
1077
1177
  def update!(**args)
1078
- @type = args[:type] if args.key?(:type)
1079
1178
  @labels = args[:labels] if args.key?(:labels)
1179
+ @name = args[:name] if args.key?(:name)
1180
+ @description = args[:description] if args.key?(:description)
1181
+ @display_name = args[:display_name] if args.key?(:display_name)
1182
+ @type = args[:type] if args.key?(:type)
1080
1183
  end
1081
1184
  end
1082
1185
 
1083
- # Describes a sink used to export log entries to one of the following
1084
- # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a
1085
- # Cloud Pub/Sub topic. A logs filter controls which log entries are exported.
1086
- # The sink must be created within a project, organization, billing account, or
1087
- # folder.
1088
- class LogSink
1186
+ # Additional information about the source code location that produced the log
1187
+ # entry.
1188
+ class LogEntrySourceLocation
1089
1189
  include Google::Apis::Core::Hashable
1090
1190
 
1091
- # Optional. This field applies only to sinks owned by organizations and folders.
1092
- # If the field is false, the default, only the logs owned by the sink's parent
1093
- # resource are available for export. If the field is true, then logs from all
1094
- # the projects, folders, and billing accounts contained in the sink's parent
1095
- # resource are also available for export. Whether a particular log entry from
1096
- # the children is exported depends on the sink's filter expression. For example,
1097
- # if this field is true, then the filter resource.type=gce_instance would export
1098
- # all Compute Engine VM instance log entries from all projects in the sink's
1099
- # parent. To only export entries from certain child projects, filter on the
1100
- # project part of the log name:
1101
- # logName:("projects/test-project1/" OR "projects/test-project2/") AND
1102
- # resource.type=gce_instance
1103
- # Corresponds to the JSON property `includeChildren`
1104
- # @return [Boolean]
1105
- attr_accessor :include_children
1106
- alias_method :include_children?, :include_children
1107
-
1108
- # Optional. An advanced logs filter. The only exported log entries are those
1109
- # that are in the resource owning the sink and that match the filter. The filter
1110
- # must use the log entry format specified by the output_version_format parameter.
1111
- # For example, in the v2 format:
1112
- # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR
1113
- # Corresponds to the JSON property `filter`
1114
- # @return [String]
1115
- attr_accessor :filter
1116
-
1117
- # Required. The export destination:
1118
- # "storage.googleapis.com/[GCS_BUCKET]"
1119
- # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]"
1120
- # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]"
1121
- # The sink's writer_identity, set when the sink is created, must have permission
1122
- # to write to the destination or else the log entries are not exported. For more
1123
- # information, see Exporting Logs With Sinks.
1124
- # Corresponds to the JSON property `destination`
1125
- # @return [String]
1126
- attr_accessor :destination
1127
-
1128
- # Optional. The time at which this sink will stop exporting log entries. Log
1129
- # entries are exported only if their timestamp is earlier than the end time. If
1130
- # this field is not supplied, there is no end time. If both a start time and an
1131
- # end time are provided, then the end time must be later than the start time.
1132
- # Corresponds to the JSON property `endTime`
1133
- # @return [String]
1134
- attr_accessor :end_time
1135
-
1136
- # Optional. The time at which this sink will begin exporting log entries. Log
1137
- # entries are exported only if their timestamp is not earlier than the start
1138
- # time. The default value of this field is the time the sink is created or
1139
- # updated.
1140
- # Corresponds to the JSON property `startTime`
1141
- # @return [String]
1142
- attr_accessor :start_time
1143
-
1144
- # Output only. An IAM identity&mdash;a service account or group&mdash;under
1145
- # which Stackdriver Logging writes the exported log entries to the sink's
1146
- # destination. This field is set by sinks.create and sinks.update, based on the
1147
- # setting of unique_writer_identity in those methods.Until you grant this
1148
- # identity write-access to the destination, log entry exports from this sink
1149
- # will fail. For more information, see Granting access for a resource. Consult
1150
- # the destination service's documentation to determine the appropriate IAM roles
1151
- # to assign to the identity.
1152
- # Corresponds to the JSON property `writerIdentity`
1191
+ # Optional. Source file name. Depending on the runtime environment, this might
1192
+ # be a simple name or a fully-qualified name.
1193
+ # Corresponds to the JSON property `file`
1153
1194
  # @return [String]
1154
- attr_accessor :writer_identity
1195
+ attr_accessor :file
1155
1196
 
1156
- # Optional. The log entry format to use for this sink's exported log entries.
1157
- # The v2 format is used by default. The v1 format is deprecated and should be
1158
- # used only as part of a migration effort to v2. See Migration to the v2 API.
1159
- # Corresponds to the JSON property `outputVersionFormat`
1197
+ # Optional. Human-readable name of the function or method being invoked, with
1198
+ # optional context such as the class or package name. This information may be
1199
+ # used in contexts such as the logs viewer, where a file and line number are
1200
+ # less meaningful. The format can vary by language. For example: qual.if.ied.
1201
+ # Class.method (Java), dir/package.func (Go), function (Python).
1202
+ # Corresponds to the JSON property `function`
1160
1203
  # @return [String]
1161
- attr_accessor :output_version_format
1204
+ attr_accessor :function
1162
1205
 
1163
- # Required. The client-assigned sink identifier, unique within the project.
1164
- # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100
1165
- # characters and can include only the following characters: upper and lower-case
1166
- # alphanumeric characters, underscores, hyphens, and periods.
1167
- # Corresponds to the JSON property `name`
1168
- # @return [String]
1169
- attr_accessor :name
1206
+ # Optional. Line within the source file. 1-based; 0 indicates no line number
1207
+ # available.
1208
+ # Corresponds to the JSON property `line`
1209
+ # @return [Fixnum]
1210
+ attr_accessor :line
1170
1211
 
1171
1212
  def initialize(**args)
1172
1213
  update!(**args)
@@ -1174,111 +1215,68 @@ module Google
1174
1215
 
1175
1216
  # Update properties of this object
1176
1217
  def update!(**args)
1177
- @include_children = args[:include_children] if args.key?(:include_children)
1178
- @filter = args[:filter] if args.key?(:filter)
1179
- @destination = args[:destination] if args.key?(:destination)
1180
- @end_time = args[:end_time] if args.key?(:end_time)
1181
- @start_time = args[:start_time] if args.key?(:start_time)
1182
- @writer_identity = args[:writer_identity] if args.key?(:writer_identity)
1183
- @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
1184
- @name = args[:name] if args.key?(:name)
1218
+ @file = args[:file] if args.key?(:file)
1219
+ @function = args[:function] if args.key?(:function)
1220
+ @line = args[:line] if args.key?(:line)
1185
1221
  end
1186
1222
  end
1187
1223
 
1188
- # The parameters to WriteLogEntries.
1189
- class WriteLogEntriesRequest
1224
+ # Result returned from ListLogEntries.
1225
+ class ListLogEntriesResponse
1190
1226
  include Google::Apis::Core::Hashable
1191
1227
 
1192
- # Optional. A default log resource name that is assigned to all log entries in
1193
- # entries that do not specify a value for log_name:
1194
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
1195
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
1196
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
1197
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
1198
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
1199
- # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
1200
- # 2Factivity". For more information about log names, see LogEntry.
1201
- # Corresponds to the JSON property `logName`
1228
+ # If there might be more results than those appearing in this response, then
1229
+ # nextPageToken is included. To get the next set of results, call this method
1230
+ # again using the value of nextPageToken as pageToken.If a value for
1231
+ # next_page_token appears and the entries field is empty, it means that the
1232
+ # search found no log entries so far but it did not have time to search all the
1233
+ # possible log entries. Retry the method with this value for page_token to
1234
+ # continue the search. Alternatively, consider speeding up the search by
1235
+ # changing your filter to specify a single log name or resource type, or to
1236
+ # narrow the time range of the search.
1237
+ # Corresponds to the JSON property `nextPageToken`
1202
1238
  # @return [String]
1203
- attr_accessor :log_name
1239
+ attr_accessor :next_page_token
1204
1240
 
1205
- # Required. The log entries to write. Values supplied for the fields log_name,
1206
- # resource, and labels in this entries.write request are inserted into those log
1207
- # entries in this list that do not provide their own values.Stackdriver Logging
1208
- # also creates and inserts values for timestamp and insert_id if the entries do
1209
- # not provide them. The created insert_id for the N'th entry in this list will
1210
- # be greater than earlier entries and less than later entries. Otherwise, the
1211
- # order of log entries in this list does not matter.To improve throughput and to
1212
- # avoid exceeding the quota limit for calls to entries.write, you should write
1213
- # multiple log entries at once rather than calling this method for each
1214
- # individual log entry.
1241
+ # A list of log entries.
1215
1242
  # Corresponds to the JSON property `entries`
1216
1243
  # @return [Array<Google::Apis::LoggingV2::LogEntry>]
1217
1244
  attr_accessor :entries
1218
1245
 
1219
- # Optional. Whether valid entries should be written even if some other entries
1220
- # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not
1221
- # written, then the response status is the error associated with one of the
1222
- # failed entries and the response includes error details keyed by the entries'
1223
- # zero-based index in the entries.write method.
1224
- # Corresponds to the JSON property `partialSuccess`
1225
- # @return [Boolean]
1226
- attr_accessor :partial_success
1227
- alias_method :partial_success?, :partial_success
1228
-
1229
- # Optional. Default labels that are added to the labels field of all log entries
1230
- # in entries. If a log entry already has a label with the same key as a label in
1231
- # this parameter, then the log entry's label is not changed. See LogEntry.
1232
- # Corresponds to the JSON property `labels`
1233
- # @return [Hash<String,String>]
1234
- attr_accessor :labels
1235
-
1236
- # An object representing a resource that can be used for monitoring, logging,
1237
- # billing, or other purposes. Examples include virtual machine instances,
1238
- # databases, and storage devices such as disks. The type field identifies a
1239
- # MonitoredResourceDescriptor object that describes the resource's schema.
1240
- # Information in the labels field identifies the actual resource and its
1241
- # attributes according to the schema. For example, a particular Compute Engine
1242
- # VM instance could be represented by the following object, because the
1243
- # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "
1244
- # zone":
1245
- # ` "type": "gce_instance",
1246
- # "labels": ` "instance_id": "12345678901234",
1247
- # "zone": "us-central1-a" ``
1248
- # Corresponds to the JSON property `resource`
1249
- # @return [Google::Apis::LoggingV2::MonitoredResource]
1250
- attr_accessor :resource
1251
-
1252
1246
  def initialize(**args)
1253
1247
  update!(**args)
1254
1248
  end
1255
1249
 
1256
1250
  # Update properties of this object
1257
1251
  def update!(**args)
1258
- @log_name = args[:log_name] if args.key?(:log_name)
1252
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1259
1253
  @entries = args[:entries] if args.key?(:entries)
1260
- @partial_success = args[:partial_success] if args.key?(:partial_success)
1261
- @labels = args[:labels] if args.key?(:labels)
1262
- @resource = args[:resource] if args.key?(:resource)
1263
1254
  end
1264
1255
  end
1265
1256
 
1266
- # Result returned from ListLogs.
1267
- class ListLogsResponse
1257
+ # Application log line emitted while processing a request.
1258
+ class LogLine
1268
1259
  include Google::Apis::Core::Hashable
1269
1260
 
1270
- # If there might be more results than those appearing in this response, then
1271
- # nextPageToken is included. To get the next set of results, call this method
1272
- # again using the value of nextPageToken as pageToken.
1273
- # Corresponds to the JSON property `nextPageToken`
1261
+ # App-provided log message.
1262
+ # Corresponds to the JSON property `logMessage`
1274
1263
  # @return [String]
1275
- attr_accessor :next_page_token
1264
+ attr_accessor :log_message
1276
1265
 
1277
- # A list of log names. For example, "projects/my-project/syslog" or "
1278
- # organizations/123/cloudresourcemanager.googleapis.com%2Factivity".
1279
- # Corresponds to the JSON property `logNames`
1280
- # @return [Array<String>]
1281
- attr_accessor :log_names
1266
+ # Severity of this log entry.
1267
+ # Corresponds to the JSON property `severity`
1268
+ # @return [String]
1269
+ attr_accessor :severity
1270
+
1271
+ # Specifies a location in a source code file.
1272
+ # Corresponds to the JSON property `sourceLocation`
1273
+ # @return [Google::Apis::LoggingV2::SourceLocation]
1274
+ attr_accessor :source_location
1275
+
1276
+ # Approximate time when this log entry was made.
1277
+ # Corresponds to the JSON property `time`
1278
+ # @return [String]
1279
+ attr_accessor :time
1282
1280
 
1283
1281
  def initialize(**args)
1284
1282
  update!(**args)
@@ -1286,8 +1284,10 @@ module Google
1286
1284
 
1287
1285
  # Update properties of this object
1288
1286
  def update!(**args)
1289
- @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1290
- @log_names = args[:log_names] if args.key?(:log_names)
1287
+ @log_message = args[:log_message] if args.key?(:log_message)
1288
+ @severity = args[:severity] if args.key?(:severity)
1289
+ @source_location = args[:source_location] if args.key?(:source_location)
1290
+ @time = args[:time] if args.key?(:time)
1291
1291
  end
1292
1292
  end
1293
1293
  end