google-api-client 0.9.1 → 0.9.2

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 (181) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +11 -2
  4. data/api_names.yaml +76 -43
  5. data/api_names_out.yaml +3853 -3508
  6. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +151 -151
  7. data/generated/google/apis/adexchangebuyer_v1_4.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +2785 -0
  9. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1033 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +1378 -0
  11. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +79 -79
  12. data/generated/google/apis/admin_datatransfer_v1/classes.rb +26 -26
  13. data/generated/google/apis/admin_directory_v1/classes.rb +374 -374
  14. data/generated/google/apis/admin_reports_v1/classes.rb +63 -63
  15. data/generated/google/apis/adsense_v1_4.rb +1 -1
  16. data/generated/google/apis/adsense_v1_4/classes.rb +145 -143
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/adsensehost_v4_1/classes.rb +95 -92
  19. data/generated/google/apis/analytics_v3/classes.rb +582 -582
  20. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  21. data/generated/google/apis/androidenterprise_v1/classes.rb +132 -132
  22. data/generated/google/apis/androidenterprise_v1/service.rb +9 -8
  23. data/generated/google/apis/androidpublisher_v2/classes.rb +122 -122
  24. data/generated/google/apis/appengine_v1beta4.rb +1 -1
  25. data/generated/google/apis/appengine_v1beta4/classes.rb +195 -142
  26. data/generated/google/apis/appengine_v1beta4/representations.rb +16 -0
  27. data/generated/google/apis/appengine_v1beta4/service.rb +3 -2
  28. data/generated/google/apis/appengine_v1beta5.rb +35 -0
  29. data/generated/google/apis/appengine_v1beta5/classes.rb +1523 -0
  30. data/generated/google/apis/appengine_v1beta5/representations.rb +525 -0
  31. data/generated/google/apis/appengine_v1beta5/service.rb +478 -0
  32. data/generated/google/apis/appsactivity_v1/classes.rb +34 -34
  33. data/generated/google/apis/appstate_v1.rb +1 -1
  34. data/generated/google/apis/appstate_v1/classes.rb +12 -12
  35. data/generated/google/apis/autoscaler_v1beta2/classes.rb +82 -82
  36. data/generated/google/apis/bigquery_v2.rb +1 -1
  37. data/generated/google/apis/bigquery_v2/classes.rb +266 -265
  38. data/generated/google/apis/blogger_v3/classes.rb +145 -145
  39. data/generated/google/apis/books_v1.rb +1 -1
  40. data/generated/google/apis/books_v1/classes.rb +431 -431
  41. data/generated/google/apis/books_v1/service.rb +3 -12
  42. data/generated/google/apis/calendar_v3.rb +1 -1
  43. data/generated/google/apis/calendar_v3/classes.rb +180 -180
  44. data/generated/google/apis/civicinfo_v2/classes.rb +125 -125
  45. data/generated/google/apis/classroom_v1/classes.rb +42 -42
  46. data/generated/google/apis/cloudbilling_v1/classes.rb +11 -11
  47. data/generated/google/apis/{mapsengine_v1.rb → cloudbuild_v1.rb} +11 -14
  48. data/generated/google/apis/cloudbuild_v1/classes.rb +521 -0
  49. data/generated/google/apis/cloudbuild_v1/representations.rb +190 -0
  50. data/generated/google/apis/cloudbuild_v1/service.rb +278 -0
  51. data/generated/google/apis/clouddebugger_v2/classes.rb +81 -81
  52. data/generated/google/apis/cloudlatencytest_v2.rb +34 -0
  53. data/generated/google/apis/cloudlatencytest_v2/classes.rb +195 -0
  54. data/generated/google/apis/cloudlatencytest_v2/representations.rb +113 -0
  55. data/generated/google/apis/cloudlatencytest_v2/service.rb +135 -0
  56. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  57. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +55 -55
  58. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +26 -26
  59. data/generated/google/apis/cloudtrace_v1/classes.rb +13 -13
  60. data/generated/google/apis/clouduseraccounts_beta/classes.rb +85 -85
  61. data/generated/google/apis/compute_beta.rb +1 -1
  62. data/generated/google/apis/compute_beta/classes.rb +1051 -998
  63. data/generated/google/apis/compute_beta/representations.rb +1 -0
  64. data/generated/google/apis/compute_beta/service.rb +426 -366
  65. data/generated/google/apis/compute_v1.rb +1 -1
  66. data/generated/google/apis/compute_v1/classes.rb +1332 -946
  67. data/generated/google/apis/compute_v1/representations.rb +108 -0
  68. data/generated/google/apis/compute_v1/service.rb +686 -318
  69. data/generated/google/apis/container_v1/classes.rb +43 -43
  70. data/generated/google/apis/content_v2.rb +1 -1
  71. data/generated/google/apis/content_v2/classes.rb +767 -639
  72. data/generated/google/apis/content_v2/representations.rb +40 -0
  73. data/generated/google/apis/coordinate_v1/classes.rb +66 -66
  74. data/generated/google/apis/customsearch_v1/classes.rb +96 -96
  75. data/generated/google/apis/dataproc_v1.rb +43 -0
  76. data/generated/google/apis/dataproc_v1/classes.rb +175 -0
  77. data/generated/google/apis/dataproc_v1/representations.rb +84 -0
  78. data/generated/google/apis/dataproc_v1/service.rb +142 -0
  79. data/generated/google/apis/datastore_v1beta2/classes.rb +105 -105
  80. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  81. data/generated/google/apis/deploymentmanager_v2/classes.rb +183 -112
  82. data/generated/google/apis/deploymentmanager_v2/representations.rb +28 -0
  83. data/generated/google/apis/deploymentmanager_v2/service.rb +42 -37
  84. data/generated/google/apis/dfareporting_v2_3.rb +37 -0
  85. data/generated/google/apis/dfareporting_v2_3/classes.rb +10830 -0
  86. data/generated/google/apis/dfareporting_v2_3/representations.rb +3443 -0
  87. data/generated/google/apis/dfareporting_v2_3/service.rb +8581 -0
  88. data/generated/google/apis/discovery_v1/classes.rb +106 -106
  89. data/generated/google/apis/dns_v1/classes.rb +39 -39
  90. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  91. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +155 -69
  92. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +31 -0
  93. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +33 -0
  94. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  95. data/generated/google/apis/doubleclicksearch_v2/classes.rb +106 -104
  96. data/generated/google/apis/drive_v2.rb +1 -1
  97. data/generated/google/apis/drive_v2/classes.rb +308 -308
  98. data/generated/google/apis/drive_v2/service.rb +44 -0
  99. data/generated/google/apis/drive_v3.rb +1 -1
  100. data/generated/google/apis/drive_v3/classes.rb +178 -178
  101. data/generated/google/apis/drive_v3/service.rb +2 -1
  102. data/generated/google/apis/fitness_v1/classes.rb +74 -74
  103. data/generated/google/apis/fusiontables_v2/classes.rb +108 -108
  104. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  105. data/generated/google/apis/games_configuration_v1configuration/classes.rb +52 -52
  106. data/generated/google/apis/games_management_v1management.rb +2 -2
  107. data/generated/google/apis/games_management_v1management/classes.rb +55 -46
  108. data/generated/google/apis/games_management_v1management/representations.rb +1 -0
  109. data/generated/google/apis/games_v1.rb +2 -2
  110. data/generated/google/apis/games_v1/classes.rb +484 -475
  111. data/generated/google/apis/games_v1/representations.rb +1 -0
  112. data/generated/google/apis/gan_v1beta1/classes.rb +187 -187
  113. data/generated/google/apis/genomics_v1.rb +2 -2
  114. data/generated/google/apis/genomics_v1/classes.rb +441 -232
  115. data/generated/google/apis/genomics_v1/representations.rb +85 -0
  116. data/generated/google/apis/genomics_v1/service.rb +1 -1
  117. data/generated/google/apis/gmail_v1/classes.rb +73 -73
  118. data/generated/google/apis/groupsmigration_v1/classes.rb +2 -2
  119. data/generated/google/apis/groupssettings_v1/classes.rb +28 -28
  120. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  121. data/generated/google/apis/identitytoolkit_v3/classes.rb +232 -166
  122. data/generated/google/apis/identitytoolkit_v3/representations.rb +10 -0
  123. data/generated/google/apis/kgsearch_v1/classes.rb +3 -3
  124. data/generated/google/apis/licensing_v1/classes.rb +11 -11
  125. data/generated/google/apis/logging_v2beta1.rb +47 -0
  126. data/generated/google/apis/logging_v2beta1/classes.rb +990 -0
  127. data/generated/google/apis/logging_v2beta1/representations.rb +337 -0
  128. data/generated/google/apis/logging_v2beta1/service.rb +547 -0
  129. data/generated/google/apis/manager_v1beta2/classes.rb +125 -125
  130. data/generated/google/apis/mirror_v1/classes.rb +101 -101
  131. data/generated/google/apis/oauth2_v2.rb +2 -2
  132. data/generated/google/apis/oauth2_v2/classes.rb +27 -27
  133. data/generated/google/apis/pagespeedonline_v2/classes.rb +62 -62
  134. data/generated/google/apis/partners_v2/classes.rb +87 -87
  135. data/generated/google/apis/people_v1.rb +59 -0
  136. data/generated/google/apis/people_v1/classes.rb +1594 -0
  137. data/generated/google/apis/people_v1/representations.rb +593 -0
  138. data/generated/google/apis/people_v1/service.rb +193 -0
  139. data/generated/google/apis/plus_domains_v1.rb +2 -2
  140. data/generated/google/apis/plus_domains_v1/classes.rb +274 -274
  141. data/generated/google/apis/plus_v1.rb +2 -2
  142. data/generated/google/apis/plus_v1/classes.rb +215 -215
  143. data/generated/google/apis/prediction_v1_6/classes.rb +73 -73
  144. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +45 -45
  145. data/generated/google/apis/pubsub_v1/classes.rb +36 -36
  146. data/generated/google/apis/qpx_express_v1/classes.rb +135 -135
  147. data/generated/google/apis/replicapool_v1beta2/classes.rb +63 -63
  148. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +76 -76
  149. data/generated/google/apis/reseller_v1.rb +1 -1
  150. data/generated/google/apis/reseller_v1/classes.rb +55 -55
  151. data/generated/google/apis/reseller_v1/service.rb +1 -1
  152. data/generated/google/apis/resourceviews_v1beta2/classes.rb +68 -68
  153. data/generated/google/apis/script_v1/classes.rb +18 -18
  154. data/generated/google/apis/site_verification_v1/classes.rb +12 -12
  155. data/generated/google/apis/sqladmin_v1beta4/classes.rb +203 -203
  156. data/generated/google/apis/storage_v1.rb +1 -1
  157. data/generated/google/apis/storage_v1/classes.rb +130 -130
  158. data/generated/google/apis/storagetransfer_v1/classes.rb +84 -84
  159. data/generated/google/apis/tagmanager_v1/classes.rb +154 -154
  160. data/generated/google/apis/taskqueue_v1beta2/classes.rb +24 -24
  161. data/generated/google/apis/tasks_v1/classes.rb +32 -32
  162. data/generated/google/apis/translate_v2/classes.rb +10 -10
  163. data/generated/google/apis/urlshortener_v1/classes.rb +24 -24
  164. data/generated/google/apis/webmasters_v3/classes.rb +49 -49
  165. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  166. data/generated/google/apis/youtube_analytics_v1/classes.rb +49 -49
  167. data/generated/google/apis/youtube_v3.rb +1 -1
  168. data/generated/google/apis/youtube_v3/classes.rb +882 -895
  169. data/generated/google/apis/youtube_v3/representations.rb +2 -13
  170. data/generated/google/apis/youtubereporting_v1/classes.rb +19 -19
  171. data/lib/google/apis/core/api_command.rb +1 -1
  172. data/lib/google/apis/core/upload.rb +1 -1
  173. data/lib/google/apis/generator/templates/_class.tmpl +1 -1
  174. data/lib/google/apis/version.rb +1 -1
  175. data/samples/cli/lib/base_cli.rb +2 -1
  176. data/samples/cli/lib/samples/androidpublisher.rb +47 -0
  177. data/script/generate +17 -13
  178. metadata +35 -6
  179. data/generated/google/apis/mapsengine_v1/classes.rb +0 -2873
  180. data/generated/google/apis/mapsengine_v1/representations.rb +0 -1235
  181. data/generated/google/apis/mapsengine_v1/service.rb +0 -3388
@@ -149,6 +149,7 @@ module Google
149
149
  class CreateAuthUriResponse
150
150
  # @private
151
151
  class Representation < Google::Apis::Core::JsonRepresentation
152
+ collection :all_providers, as: 'allProviders'
152
153
  property :auth_uri, as: 'authUri'
153
154
  property :captcha_required, as: 'captchaRequired'
154
155
  property :for_existing_provider, as: 'forExistingProvider'
@@ -222,6 +223,7 @@ module Google
222
223
  class DeleteAccountRequest
223
224
  # @private
224
225
  class Representation < Google::Apis::Core::JsonRepresentation
226
+ property :delegated_project_number, as: 'delegatedProjectNumber'
225
227
  property :local_id, as: 'localId'
226
228
  end
227
229
  end
@@ -229,6 +231,7 @@ module Google
229
231
  class DownloadAccountRequest
230
232
  # @private
231
233
  class Representation < Google::Apis::Core::JsonRepresentation
234
+ property :delegated_project_number, as: 'delegatedProjectNumber'
232
235
  property :max_results, as: 'maxResults'
233
236
  property :next_page_token, as: 'nextPageToken'
234
237
  end
@@ -269,6 +272,7 @@ module Google
269
272
  class Representation < Google::Apis::Core::JsonRepresentation
270
273
  property :captcha_challenge, as: 'captchaChallenge'
271
274
  property :captcha_response, as: 'captchaResponse'
275
+ property :delegated_project_number, as: 'delegatedProjectNumber'
272
276
  property :disable_user, as: 'disableUser'
273
277
  property :display_name, as: 'displayName'
274
278
  property :email, as: 'email'
@@ -278,6 +282,7 @@ module Google
278
282
  property :local_id, as: 'localId'
279
283
  property :oob_code, as: 'oobCode'
280
284
  property :password, as: 'password'
285
+ property :photo_url, as: 'photoUrl'
281
286
  collection :provider, as: 'provider'
282
287
  property :upgrade_to_federated_login, as: 'upgradeToFederatedLogin'
283
288
  property :valid_since, as: 'validSince'
@@ -302,6 +307,7 @@ module Google
302
307
  class UploadAccountRequest
303
308
  # @private
304
309
  class Representation < Google::Apis::Core::JsonRepresentation
310
+ property :delegated_project_number, as: 'delegatedProjectNumber'
305
311
  property :hash_algorithm, as: 'hashAlgorithm'
306
312
  property :memory_cost, as: 'memoryCost'
307
313
  property :rounds, as: 'rounds'
@@ -315,6 +321,7 @@ module Google
315
321
  class VerifyAssertionRequest
316
322
  # @private
317
323
  class Representation < Google::Apis::Core::JsonRepresentation
324
+ property :delegated_project_number, as: 'delegatedProjectNumber'
318
325
  property :instance_id, as: 'instanceId'
319
326
  property :pending_id_token, as: 'pendingIdToken'
320
327
  property :post_body, as: 'postBody'
@@ -337,6 +344,7 @@ module Google
337
344
  class Representation < Google::Apis::Core::JsonRepresentation
338
345
  property :captcha_challenge, as: 'captchaChallenge'
339
346
  property :captcha_response, as: 'captchaResponse'
347
+ property :delegated_project_number, as: 'delegatedProjectNumber'
340
348
  property :email, as: 'email'
341
349
  property :instance_id, as: 'instanceId'
342
350
  property :password, as: 'password'
@@ -384,6 +392,7 @@ module Google
384
392
  property :id_token, as: 'idToken'
385
393
  property :kind, as: 'kind'
386
394
  property :new_email, as: 'newEmail'
395
+ property :photo_url, as: 'photoUrl'
387
396
  collection :provider_user_info, as: 'providerUserInfo', class: Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::ProviderUserInfo, decorator: Google::Apis::IdentitytoolkitV3::SetAccountInfoResponse::ProviderUserInfo::Representation
388
397
 
389
398
  end
@@ -437,6 +446,7 @@ module Google
437
446
  # @private
438
447
  class Representation < Google::Apis::Core::JsonRepresentation
439
448
  property :display_name, as: 'displayName'
449
+ property :email, as: 'email'
440
450
  property :federated_id, as: 'federatedId'
441
451
  property :photo_url, as: 'photoUrl'
442
452
  property :provider_id, as: 'providerId'
@@ -49,9 +49,9 @@ module Google
49
49
 
50
50
  # Update properties of this object
51
51
  def update!(**args)
52
- @context = args[:context] unless args[:context].nil?
53
- @type = args[:type] unless args[:type].nil?
54
- @item_list_element = args[:item_list_element] unless args[:item_list_element].nil?
52
+ @context = args[:context] if args.key?(:context)
53
+ @type = args[:type] if args.key?(:type)
54
+ @item_list_element = args[:item_list_element] if args.key?(:item_list_element)
55
55
  end
56
56
  end
57
57
  end
@@ -62,12 +62,12 @@ module Google
62
62
 
63
63
  # Update properties of this object
64
64
  def update!(**args)
65
- @etags = args[:etags] unless args[:etags].nil?
66
- @kind = args[:kind] unless args[:kind].nil?
67
- @product_id = args[:product_id] unless args[:product_id].nil?
68
- @self_link = args[:self_link] unless args[:self_link].nil?
69
- @sku_id = args[:sku_id] unless args[:sku_id].nil?
70
- @user_id = args[:user_id] unless args[:user_id].nil?
65
+ @etags = args[:etags] if args.key?(:etags)
66
+ @kind = args[:kind] if args.key?(:kind)
67
+ @product_id = args[:product_id] if args.key?(:product_id)
68
+ @self_link = args[:self_link] if args.key?(:self_link)
69
+ @sku_id = args[:sku_id] if args.key?(:sku_id)
70
+ @user_id = args[:user_id] if args.key?(:user_id)
71
71
  end
72
72
  end
73
73
 
@@ -86,7 +86,7 @@ module Google
86
86
 
87
87
  # Update properties of this object
88
88
  def update!(**args)
89
- @user_id = args[:user_id] unless args[:user_id].nil?
89
+ @user_id = args[:user_id] if args.key?(:user_id)
90
90
  end
91
91
  end
92
92
 
@@ -121,10 +121,10 @@ module Google
121
121
 
122
122
  # Update properties of this object
123
123
  def update!(**args)
124
- @etag = args[:etag] unless args[:etag].nil?
125
- @items = args[:items] unless args[:items].nil?
126
- @kind = args[:kind] unless args[:kind].nil?
127
- @next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
124
+ @etag = args[:etag] if args.key?(:etag)
125
+ @items = args[:items] if args.key?(:items)
126
+ @kind = args[:kind] if args.key?(:kind)
127
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
128
128
  end
129
129
  end
130
130
  end
@@ -0,0 +1,47 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/logging_v2beta1/service.rb'
16
+ require 'google/apis/logging_v2beta1/classes.rb'
17
+ require 'google/apis/logging_v2beta1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Cloud Logging API
22
+ #
23
+ # The Google Cloud Logging API lets you write log entries and manage your logs,
24
+ # log sinks and logs-based metrics.
25
+ #
26
+ # @see https://cloud.google.com/logging/docs/
27
+ module LoggingV2beta1
28
+ VERSION = 'V2beta1'
29
+ REVISION = '20160104'
30
+
31
+ # View and manage your data across Google Cloud Platform services
32
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
33
+
34
+ # View your data across Google Cloud Platform services
35
+ AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
36
+
37
+ # Administrate log data for your projects
38
+ AUTH_LOGGING_ADMIN = 'https://www.googleapis.com/auth/logging.admin'
39
+
40
+ # View log data for your projects
41
+ AUTH_LOGGING_READ = 'https://www.googleapis.com/auth/logging.read'
42
+
43
+ # Submit log data for your projects
44
+ AUTH_LOGGING_WRITE = 'https://www.googleapis.com/auth/logging.write'
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,990 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module LoggingV2beta1
24
+
25
+ # A generic empty message that you can re-use to avoid defining duplicated empty
26
+ # messages in your APIs. A typical example is to use it as the request or the
27
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
28
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
29
+ # `Empty` is empty JSON object ````.
30
+ class Empty
31
+ include Google::Apis::Core::Hashable
32
+
33
+ def initialize(**args)
34
+ update!(**args)
35
+ end
36
+
37
+ # Update properties of this object
38
+ def update!(**args)
39
+ end
40
+ end
41
+
42
+ # The parameters to WriteLogEntries.
43
+ class WriteLogEntriesRequest
44
+ include Google::Apis::Core::Hashable
45
+
46
+ # Optional. A default log resource name for those log entries in `entries` that
47
+ # do not specify their own `logName`. Example: `"projects/my-project/logs/syslog"
48
+ # `. See LogEntry.
49
+ # Corresponds to the JSON property `logName`
50
+ # @return [String]
51
+ attr_accessor :log_name
52
+
53
+ # A specific monitored resource or a group of monitored resources.
54
+ # Corresponds to the JSON property `resource`
55
+ # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
56
+ attr_accessor :resource
57
+
58
+ # Optional. User-defined `key:value` items that are added to the `labels` field
59
+ # of each log entry in `entries`, except when a log entry specifies its own `key:
60
+ # value` item with the same key. Example: `` "size": "large", "color":"red" ``
61
+ # Corresponds to the JSON property `labels`
62
+ # @return [Hash<String,String>]
63
+ attr_accessor :labels
64
+
65
+ # Required. The log entries to write. The log entries must have values for all
66
+ # required fields.
67
+ # Corresponds to the JSON property `entries`
68
+ # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
69
+ attr_accessor :entries
70
+
71
+ def initialize(**args)
72
+ update!(**args)
73
+ end
74
+
75
+ # Update properties of this object
76
+ def update!(**args)
77
+ @log_name = args[:log_name] if args.key?(:log_name)
78
+ @resource = args[:resource] if args.key?(:resource)
79
+ @labels = args[:labels] if args.key?(:labels)
80
+ @entries = args[:entries] if args.key?(:entries)
81
+ end
82
+ end
83
+
84
+ # A specific monitored resource or a group of monitored resources.
85
+ class MonitoredResource
86
+ include Google::Apis::Core::Hashable
87
+
88
+ # The type of monitored resource. This field must match the value of the `type`
89
+ # field in a MonitoredResourceDescriptor object. For example, `"
90
+ # cloudsql_database"` represents Cloud SQL databases.
91
+ # Corresponds to the JSON property `type`
92
+ # @return [String]
93
+ attr_accessor :type
94
+
95
+ # Values for some or all of the labels listed in the associated monitored
96
+ # resource descriptor. For example, specify a specific Cloud SQL database by
97
+ # supplying values for both the `"database_id"` and `"zone"` labels. Specify the
98
+ # set of all Cloud SQL databases in a particular location by supplying a value
99
+ # for only the `"zone"` label.
100
+ # Corresponds to the JSON property `labels`
101
+ # @return [Hash<String,String>]
102
+ attr_accessor :labels
103
+
104
+ def initialize(**args)
105
+ update!(**args)
106
+ end
107
+
108
+ # Update properties of this object
109
+ def update!(**args)
110
+ @type = args[:type] if args.key?(:type)
111
+ @labels = args[:labels] if args.key?(:labels)
112
+ end
113
+ end
114
+
115
+ # An individual entry in a log.
116
+ class LogEntry
117
+ include Google::Apis::Core::Hashable
118
+
119
+ # Required. The resource name of the log to which this log entry belongs. The
120
+ # format of the name is `projects/<project-id>/logs/<log-id%gt;`. Examples: `"
121
+ # projects/my-projectid/logs/syslog"`, `"projects/1234567890/logs/library.
122
+ # googleapis.com%2Fbook_log"`. The log ID part of resource name must be less
123
+ # than 512 characters long and can only include the following characters: upper
124
+ # and lower case alphanumeric characters: [A-Za-z0-9]; and punctuation
125
+ # characters: forward-slash, underscore, hyphen, and period. Forward-slash (`/`)
126
+ # characters in the log ID must be URL-encoded.
127
+ # Corresponds to the JSON property `logName`
128
+ # @return [String]
129
+ attr_accessor :log_name
130
+
131
+ # A specific monitored resource or a group of monitored resources.
132
+ # Corresponds to the JSON property `resource`
133
+ # @return [Google::Apis::LoggingV2beta1::MonitoredResource]
134
+ attr_accessor :resource
135
+
136
+ # The log entry payload, represented as a protocol buffer. You can only use `
137
+ # protoPayload` values that belong to a set of approved types.
138
+ # Corresponds to the JSON property `protoPayload`
139
+ # @return [Hash<String,Object>]
140
+ attr_accessor :proto_payload
141
+
142
+ # The log entry payload, represented as a Unicode string (UTF-8).
143
+ # Corresponds to the JSON property `textPayload`
144
+ # @return [String]
145
+ attr_accessor :text_payload
146
+
147
+ # The log entry payload, represented as a structure that is expressed as a JSON
148
+ # object.
149
+ # Corresponds to the JSON property `jsonPayload`
150
+ # @return [Hash<String,Object>]
151
+ attr_accessor :json_payload
152
+
153
+ # Optional. The time the event described by the log entry occurred. If omitted,
154
+ # Cloud Logging will use the time the log entry is written.
155
+ # Corresponds to the JSON property `timestamp`
156
+ # @return [String]
157
+ attr_accessor :timestamp
158
+
159
+ # Optional. The severity of the log entry. The default value is `LogSeverity.
160
+ # DEFAULT`.
161
+ # Corresponds to the JSON property `severity`
162
+ # @return [String]
163
+ attr_accessor :severity
164
+
165
+ # Optional. A unique ID for the log entry. If you provide this field, the
166
+ # logging service considers other log entries in the same log with the same ID
167
+ # as duplicates which can be removed. If omitted, Cloud Logging will generate a
168
+ # unique ID for this log entry.
169
+ # Corresponds to the JSON property `insertId`
170
+ # @return [String]
171
+ attr_accessor :insert_id
172
+
173
+ # A common proto for logging HTTP requests.
174
+ # Corresponds to the JSON property `httpRequest`
175
+ # @return [Google::Apis::LoggingV2beta1::HttpRequest]
176
+ attr_accessor :http_request
177
+
178
+ # Optional. A set of user-defined (key, value) data that provides additional
179
+ # information about the log entry.
180
+ # Corresponds to the JSON property `labels`
181
+ # @return [Hash<String,String>]
182
+ attr_accessor :labels
183
+
184
+ # Additional information about a potentially long-running operation with which a
185
+ # log entry is associated.
186
+ # Corresponds to the JSON property `operation`
187
+ # @return [Google::Apis::LoggingV2beta1::LogEntryOperation]
188
+ attr_accessor :operation
189
+
190
+ def initialize(**args)
191
+ update!(**args)
192
+ end
193
+
194
+ # Update properties of this object
195
+ def update!(**args)
196
+ @log_name = args[:log_name] if args.key?(:log_name)
197
+ @resource = args[:resource] if args.key?(:resource)
198
+ @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
199
+ @text_payload = args[:text_payload] if args.key?(:text_payload)
200
+ @json_payload = args[:json_payload] if args.key?(:json_payload)
201
+ @timestamp = args[:timestamp] if args.key?(:timestamp)
202
+ @severity = args[:severity] if args.key?(:severity)
203
+ @insert_id = args[:insert_id] if args.key?(:insert_id)
204
+ @http_request = args[:http_request] if args.key?(:http_request)
205
+ @labels = args[:labels] if args.key?(:labels)
206
+ @operation = args[:operation] if args.key?(:operation)
207
+ end
208
+ end
209
+
210
+ # A common proto for logging HTTP requests.
211
+ class HttpRequest
212
+ include Google::Apis::Core::Hashable
213
+
214
+ # The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
215
+ # Corresponds to the JSON property `requestMethod`
216
+ # @return [String]
217
+ attr_accessor :request_method
218
+
219
+ # The scheme (http, https), the host name, the path and the query portion of the
220
+ # URL that was requested. Example: `"http://example.com/some/info?color=red"`.
221
+ # Corresponds to the JSON property `requestUrl`
222
+ # @return [String]
223
+ attr_accessor :request_url
224
+
225
+ # The size of the HTTP request message in bytes, including the request headers
226
+ # and the request body.
227
+ # Corresponds to the JSON property `requestSize`
228
+ # @return [String]
229
+ attr_accessor :request_size
230
+
231
+ # The response code indicating the status of response. Examples: 200, 404.
232
+ # Corresponds to the JSON property `status`
233
+ # @return [Fixnum]
234
+ attr_accessor :status
235
+
236
+ # The size of the HTTP response message sent back to the client, in bytes,
237
+ # including the response headers and the response body.
238
+ # Corresponds to the JSON property `responseSize`
239
+ # @return [String]
240
+ attr_accessor :response_size
241
+
242
+ # The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.
243
+ # 0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
244
+ # Corresponds to the JSON property `userAgent`
245
+ # @return [String]
246
+ attr_accessor :user_agent
247
+
248
+ # The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
249
+ # Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
250
+ # Corresponds to the JSON property `remoteIp`
251
+ # @return [String]
252
+ attr_accessor :remote_ip
253
+
254
+ # The referer URL of the request, as defined in [HTTP/1.1 Header Field
255
+ # Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
256
+ # Corresponds to the JSON property `referer`
257
+ # @return [String]
258
+ attr_accessor :referer
259
+
260
+ # Whether or not an entity was served from cache (with or without validation).
261
+ # Corresponds to the JSON property `cacheHit`
262
+ # @return [Boolean]
263
+ attr_accessor :cache_hit
264
+ alias_method :cache_hit?, :cache_hit
265
+
266
+ # Whether or not the response was validated with the origin server before being
267
+ # served from cache. This field is only meaningful if `cache_hit` is True.
268
+ # Corresponds to the JSON property `validatedWithOriginServer`
269
+ # @return [Boolean]
270
+ attr_accessor :validated_with_origin_server
271
+ alias_method :validated_with_origin_server?, :validated_with_origin_server
272
+
273
+ def initialize(**args)
274
+ update!(**args)
275
+ end
276
+
277
+ # Update properties of this object
278
+ def update!(**args)
279
+ @request_method = args[:request_method] if args.key?(:request_method)
280
+ @request_url = args[:request_url] if args.key?(:request_url)
281
+ @request_size = args[:request_size] if args.key?(:request_size)
282
+ @status = args[:status] if args.key?(:status)
283
+ @response_size = args[:response_size] if args.key?(:response_size)
284
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
285
+ @remote_ip = args[:remote_ip] if args.key?(:remote_ip)
286
+ @referer = args[:referer] if args.key?(:referer)
287
+ @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
288
+ @validated_with_origin_server = args[:validated_with_origin_server] if args.key?(:validated_with_origin_server)
289
+ end
290
+ end
291
+
292
+ # Additional information about a potentially long-running operation with which a
293
+ # log entry is associated.
294
+ class LogEntryOperation
295
+ include Google::Apis::Core::Hashable
296
+
297
+ # Required. An arbitrary operation identifier. Log entries with the same
298
+ # identifier are assumed to be part of the same operation.
299
+ # Corresponds to the JSON property `id`
300
+ # @return [String]
301
+ attr_accessor :id
302
+
303
+ # Required. An arbitrary producer identifier. The combination of `id` and `
304
+ # producer` must be globally unique. Examples for `producer`: `"MyDivision.
305
+ # MyBigCompany.com"`, "github.com/MyProject/MyApplication"`.
306
+ # Corresponds to the JSON property `producer`
307
+ # @return [String]
308
+ attr_accessor :producer
309
+
310
+ # Optional. Set this to True if this is the first log entry in the operation.
311
+ # Corresponds to the JSON property `first`
312
+ # @return [Boolean]
313
+ attr_accessor :first
314
+ alias_method :first?, :first
315
+
316
+ # Optional. Set this to True if this is the last log entry in the operation.
317
+ # Corresponds to the JSON property `last`
318
+ # @return [Boolean]
319
+ attr_accessor :last
320
+ alias_method :last?, :last
321
+
322
+ def initialize(**args)
323
+ update!(**args)
324
+ end
325
+
326
+ # Update properties of this object
327
+ def update!(**args)
328
+ @id = args[:id] if args.key?(:id)
329
+ @producer = args[:producer] if args.key?(:producer)
330
+ @first = args[:first] if args.key?(:first)
331
+ @last = args[:last] if args.key?(:last)
332
+ end
333
+ end
334
+
335
+ # Result returned from WriteLogEntries. empty
336
+ class WriteLogEntriesResponse
337
+ include Google::Apis::Core::Hashable
338
+
339
+ def initialize(**args)
340
+ update!(**args)
341
+ end
342
+
343
+ # Update properties of this object
344
+ def update!(**args)
345
+ end
346
+ end
347
+
348
+ # The parameters to `ListLogEntries`.
349
+ class ListLogEntriesRequest
350
+ include Google::Apis::Core::Hashable
351
+
352
+ # Required. One or more project IDs or project numbers from which to retrieve
353
+ # log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`.
354
+ # Corresponds to the JSON property `projectIds`
355
+ # @return [Array<String>]
356
+ attr_accessor :project_ids
357
+
358
+ # Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). The
359
+ # filter is compared against all log entries in the projects specified by `
360
+ # projectIds`. Only entries that match the filter are retrieved. An empty filter
361
+ # matches all log entries.
362
+ # Corresponds to the JSON property `filter`
363
+ # @return [String]
364
+ attr_accessor :filter
365
+
366
+ # Optional. How the results should be sorted. Presently, the only permitted
367
+ # values are `"timestamp"` (default) and `"timestamp desc"`. The first option
368
+ # returns entries in order of increasing values of `LogEntry.timestamp` (oldest
369
+ # first), and the second option returns entries in order of decreasing
370
+ # timestamps (newest first). Entries with equal timestamps are returned in order
371
+ # of `LogEntry.insertId`.
372
+ # Corresponds to the JSON property `orderBy`
373
+ # @return [String]
374
+ attr_accessor :order_by
375
+
376
+ # Optional. The maximum number of results to return from this request. Fewer
377
+ # results might be returned. You must check for the `nextPageToken` result to
378
+ # determine if additional results are available, which you can retrieve by
379
+ # passing the `nextPageToken` value in the `pageToken` parameter to the next
380
+ # request.
381
+ # Corresponds to the JSON property `pageSize`
382
+ # @return [Fixnum]
383
+ attr_accessor :page_size
384
+
385
+ # Optional. If the `pageToken` request parameter is supplied, then the next page
386
+ # of results in the set are retrieved. The `pageToken` parameter must be set
387
+ # with the value of the `nextPageToken` result parameter from the previous
388
+ # request. The values of `projectIds`, `filter`, and `orderBy` must be the same
389
+ # as in the previous request.
390
+ # Corresponds to the JSON property `pageToken`
391
+ # @return [String]
392
+ attr_accessor :page_token
393
+
394
+ def initialize(**args)
395
+ update!(**args)
396
+ end
397
+
398
+ # Update properties of this object
399
+ def update!(**args)
400
+ @project_ids = args[:project_ids] if args.key?(:project_ids)
401
+ @filter = args[:filter] if args.key?(:filter)
402
+ @order_by = args[:order_by] if args.key?(:order_by)
403
+ @page_size = args[:page_size] if args.key?(:page_size)
404
+ @page_token = args[:page_token] if args.key?(:page_token)
405
+ end
406
+ end
407
+
408
+ # Result returned from `ListLogEntries`.
409
+ class ListLogEntriesResponse
410
+ include Google::Apis::Core::Hashable
411
+
412
+ # A list of log entries.
413
+ # Corresponds to the JSON property `entries`
414
+ # @return [Array<Google::Apis::LoggingV2beta1::LogEntry>]
415
+ attr_accessor :entries
416
+
417
+ # If there are more results than were returned, then `nextPageToken` is given a
418
+ # value in the response. To get the next batch of results, call this method
419
+ # again using the value of `nextPageToken` as `pageToken`.
420
+ # Corresponds to the JSON property `nextPageToken`
421
+ # @return [String]
422
+ attr_accessor :next_page_token
423
+
424
+ def initialize(**args)
425
+ update!(**args)
426
+ end
427
+
428
+ # Update properties of this object
429
+ def update!(**args)
430
+ @entries = args[:entries] if args.key?(:entries)
431
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
432
+ end
433
+ end
434
+
435
+ # Result returned from ListMonitoredResourceDescriptors.
436
+ class ListMonitoredResourceDescriptorsResponse
437
+ include Google::Apis::Core::Hashable
438
+
439
+ # A list of resource descriptors.
440
+ # Corresponds to the JSON property `resourceDescriptors`
441
+ # @return [Array<Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor>]
442
+ attr_accessor :resource_descriptors
443
+
444
+ # If there are more results than were returned, then `nextPageToken` is returned
445
+ # in the response. To get the next batch of results, call this method again
446
+ # using the value of `nextPageToken` as `pageToken`.
447
+ # Corresponds to the JSON property `nextPageToken`
448
+ # @return [String]
449
+ attr_accessor :next_page_token
450
+
451
+ def initialize(**args)
452
+ update!(**args)
453
+ end
454
+
455
+ # Update properties of this object
456
+ def update!(**args)
457
+ @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors)
458
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
459
+ end
460
+ end
461
+
462
+ # A description of a type of monitored resource.
463
+ class MonitoredResourceDescriptor
464
+ include Google::Apis::Core::Hashable
465
+
466
+ # The monitored resource type. For example, the type `"cloudsql_database"`
467
+ # represents databases in Google Cloud SQL.
468
+ # Corresponds to the JSON property `type`
469
+ # @return [String]
470
+ attr_accessor :type
471
+
472
+ # A concise name for the monitored resource type, which is displayed in user
473
+ # interfaces. For example, `"Cloud SQL Database"`.
474
+ # Corresponds to the JSON property `displayName`
475
+ # @return [String]
476
+ attr_accessor :display_name
477
+
478
+ # A detailed description of the monitored resource type, which is used in
479
+ # documentation.
480
+ # Corresponds to the JSON property `description`
481
+ # @return [String]
482
+ attr_accessor :description
483
+
484
+ # A set of labels that can be used to describe instances of this monitored
485
+ # resource type. For example, Cloud SQL databases can be labeled with their `"
486
+ # database_id"` and their `"zone"`.
487
+ # Corresponds to the JSON property `labels`
488
+ # @return [Array<Google::Apis::LoggingV2beta1::LabelDescriptor>]
489
+ attr_accessor :labels
490
+
491
+ def initialize(**args)
492
+ update!(**args)
493
+ end
494
+
495
+ # Update properties of this object
496
+ def update!(**args)
497
+ @type = args[:type] if args.key?(:type)
498
+ @display_name = args[:display_name] if args.key?(:display_name)
499
+ @description = args[:description] if args.key?(:description)
500
+ @labels = args[:labels] if args.key?(:labels)
501
+ end
502
+ end
503
+
504
+ # A description of a label.
505
+ class LabelDescriptor
506
+ include Google::Apis::Core::Hashable
507
+
508
+ # The label key.
509
+ # Corresponds to the JSON property `key`
510
+ # @return [String]
511
+ attr_accessor :key
512
+
513
+ # The type of data that can be assigned to the label.
514
+ # Corresponds to the JSON property `valueType`
515
+ # @return [String]
516
+ attr_accessor :value_type
517
+
518
+ # A human-readable description for the label.
519
+ # Corresponds to the JSON property `description`
520
+ # @return [String]
521
+ attr_accessor :description
522
+
523
+ def initialize(**args)
524
+ update!(**args)
525
+ end
526
+
527
+ # Update properties of this object
528
+ def update!(**args)
529
+ @key = args[:key] if args.key?(:key)
530
+ @value_type = args[:value_type] if args.key?(:value_type)
531
+ @description = args[:description] if args.key?(:description)
532
+ end
533
+ end
534
+
535
+ # Result returned from `ListSinks`.
536
+ class ListSinksResponse
537
+ include Google::Apis::Core::Hashable
538
+
539
+ # A list of sinks.
540
+ # Corresponds to the JSON property `sinks`
541
+ # @return [Array<Google::Apis::LoggingV2beta1::LogSink>]
542
+ attr_accessor :sinks
543
+
544
+ # If there are more results than were returned, then `nextPageToken` is given a
545
+ # value in the response. To get the next batch of results, call this method
546
+ # again using the value of `nextPageToken` as `pageToken`.
547
+ # Corresponds to the JSON property `nextPageToken`
548
+ # @return [String]
549
+ attr_accessor :next_page_token
550
+
551
+ def initialize(**args)
552
+ update!(**args)
553
+ end
554
+
555
+ # Update properties of this object
556
+ def update!(**args)
557
+ @sinks = args[:sinks] if args.key?(:sinks)
558
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
559
+ end
560
+ end
561
+
562
+ # Describes a sink used to export log entries outside Cloud Logging.
563
+ class LogSink
564
+ include Google::Apis::Core::Hashable
565
+
566
+ # Required. The client-assigned sink identifier. Example: `"my-severe-errors-to-
567
+ # pubsub"`. Sink identifiers are limited to 1000 characters and can include only
568
+ # the following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.`
569
+ # .
570
+ # Corresponds to the JSON property `name`
571
+ # @return [String]
572
+ attr_accessor :name
573
+
574
+ # The export destination. See [Exporting Logs With Sinks](/logging/docs/api/
575
+ # tasks/exporting-logs). Examples: `"storage.googleapis.com/a-bucket"`, `"
576
+ # bigquery.googleapis.com/projects/a-project-id/datasets/a-dataset"`.
577
+ # Corresponds to the JSON property `destination`
578
+ # @return [String]
579
+ attr_accessor :destination
580
+
581
+ # An [advanced logs filter](/logging/docs/view/advanced_filters) that defines
582
+ # the log entries to be exported. The filter must be consistent with the log
583
+ # entry format designed by the `outputVersionFormat` parameter, regardless of
584
+ # the format of the log entry that was originally written to Cloud Logging.
585
+ # Example: `"logName:syslog AND severity>=ERROR"`.
586
+ # Corresponds to the JSON property `filter`
587
+ # @return [String]
588
+ attr_accessor :filter
589
+
590
+ # The log entry version used when exporting log entries from this sink. This
591
+ # version does not have to correspond to the version of the log entry when it
592
+ # was written to Cloud Logging.
593
+ # Corresponds to the JSON property `outputVersionFormat`
594
+ # @return [String]
595
+ attr_accessor :output_version_format
596
+
597
+ def initialize(**args)
598
+ update!(**args)
599
+ end
600
+
601
+ # Update properties of this object
602
+ def update!(**args)
603
+ @name = args[:name] if args.key?(:name)
604
+ @destination = args[:destination] if args.key?(:destination)
605
+ @filter = args[:filter] if args.key?(:filter)
606
+ @output_version_format = args[:output_version_format] if args.key?(:output_version_format)
607
+ end
608
+ end
609
+
610
+ # Result returned from ListLogMetrics.
611
+ class ListLogMetricsResponse
612
+ include Google::Apis::Core::Hashable
613
+
614
+ # A list of logs-based metrics.
615
+ # Corresponds to the JSON property `metrics`
616
+ # @return [Array<Google::Apis::LoggingV2beta1::LogMetric>]
617
+ attr_accessor :metrics
618
+
619
+ # If there are more results than were returned, then `nextPageToken` is given a
620
+ # value in the response. To get the next batch of results, call this method
621
+ # again using the value of `nextPageToken` as `pageToken`.
622
+ # Corresponds to the JSON property `nextPageToken`
623
+ # @return [String]
624
+ attr_accessor :next_page_token
625
+
626
+ def initialize(**args)
627
+ update!(**args)
628
+ end
629
+
630
+ # Update properties of this object
631
+ def update!(**args)
632
+ @metrics = args[:metrics] if args.key?(:metrics)
633
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
634
+ end
635
+ end
636
+
637
+ # Describes a logs-based metric. The value of the metric is the number of log
638
+ # entries that match a logs filter.
639
+ class LogMetric
640
+ include Google::Apis::Core::Hashable
641
+
642
+ # Required. The client-assigned metric identifier. Example: `"severe_errors"`.
643
+ # Metric identifiers are limited to 1000 characters and can include only the
644
+ # following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.,+!*'
645
+ # ,()%/\`. The forward-slash character (`/`) denotes a hierarchy of name pieces,
646
+ # and it cannot be the first character of the name.
647
+ # Corresponds to the JSON property `name`
648
+ # @return [String]
649
+ attr_accessor :name
650
+
651
+ # A description of this metric, which is used in documentation.
652
+ # Corresponds to the JSON property `description`
653
+ # @return [String]
654
+ attr_accessor :description
655
+
656
+ # An [advanced logs filter](/logging/docs/view/advanced_filters). Example: `"
657
+ # logName:syslog AND severity>=ERROR"`.
658
+ # Corresponds to the JSON property `filter`
659
+ # @return [String]
660
+ attr_accessor :filter
661
+
662
+ def initialize(**args)
663
+ update!(**args)
664
+ end
665
+
666
+ # Update properties of this object
667
+ def update!(**args)
668
+ @name = args[:name] if args.key?(:name)
669
+ @description = args[:description] if args.key?(:description)
670
+ @filter = args[:filter] if args.key?(:filter)
671
+ end
672
+ end
673
+
674
+ # Complete log information about a single HTTP request to an App Engine
675
+ # application.
676
+ class RequestLog
677
+ include Google::Apis::Core::Hashable
678
+
679
+ # Application that handled this request.
680
+ # Corresponds to the JSON property `appId`
681
+ # @return [String]
682
+ attr_accessor :app_id
683
+
684
+ # Module of the application that handled this request.
685
+ # Corresponds to the JSON property `moduleId`
686
+ # @return [String]
687
+ attr_accessor :module_id
688
+
689
+ # Version of the application that handled this request.
690
+ # Corresponds to the JSON property `versionId`
691
+ # @return [String]
692
+ attr_accessor :version_id
693
+
694
+ # Globally unique identifier for a request, which is based on the request start
695
+ # time. Request IDs for requests which started later will compare greater as
696
+ # strings than those for requests which started earlier.
697
+ # Corresponds to the JSON property `requestId`
698
+ # @return [String]
699
+ attr_accessor :request_id
700
+
701
+ # Origin IP address.
702
+ # Corresponds to the JSON property `ip`
703
+ # @return [String]
704
+ attr_accessor :ip
705
+
706
+ # Time when the request started.
707
+ # Corresponds to the JSON property `startTime`
708
+ # @return [String]
709
+ attr_accessor :start_time
710
+
711
+ # Time when the request finished.
712
+ # Corresponds to the JSON property `endTime`
713
+ # @return [String]
714
+ attr_accessor :end_time
715
+
716
+ # Latency of the request.
717
+ # Corresponds to the JSON property `latency`
718
+ # @return [String]
719
+ attr_accessor :latency
720
+
721
+ # Number of CPU megacycles used to process request.
722
+ # Corresponds to the JSON property `megaCycles`
723
+ # @return [String]
724
+ attr_accessor :mega_cycles
725
+
726
+ # Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`.
727
+ # Corresponds to the JSON property `method`
728
+ # @return [String]
729
+ attr_accessor :method_prop
730
+
731
+ # Contains the path and query portion of the URL that was requested. For example,
732
+ # if the URL was "http://example.com/app?name=val", the resource would be "/app?
733
+ # name=val". The fragment identifier, which is identified by the `#` character,
734
+ # is not included.
735
+ # Corresponds to the JSON property `resource`
736
+ # @return [String]
737
+ attr_accessor :resource
738
+
739
+ # HTTP version of request. Example: `"HTTP/1.1"`.
740
+ # Corresponds to the JSON property `httpVersion`
741
+ # @return [String]
742
+ attr_accessor :http_version
743
+
744
+ # HTTP response status code. Example: 200, 404.
745
+ # Corresponds to the JSON property `status`
746
+ # @return [Fixnum]
747
+ attr_accessor :status
748
+
749
+ # Size in bytes sent back to client by request.
750
+ # Corresponds to the JSON property `responseSize`
751
+ # @return [String]
752
+ attr_accessor :response_size
753
+
754
+ # Referrer URL of request.
755
+ # Corresponds to the JSON property `referrer`
756
+ # @return [String]
757
+ attr_accessor :referrer
758
+
759
+ # User agent that made the request.
760
+ # Corresponds to the JSON property `userAgent`
761
+ # @return [String]
762
+ attr_accessor :user_agent
763
+
764
+ # The logged-in user who made the request. Most likely, this is the part of the
765
+ # user's email before the `@` sign. The field value is the same for different
766
+ # requests from the same user, but different users can have similar names. This
767
+ # information is also available to the application via the App Engine Users API.
768
+ # This field will be populated starting with App Engine 1.9.21.
769
+ # Corresponds to the JSON property `nickname`
770
+ # @return [String]
771
+ attr_accessor :nickname
772
+
773
+ # File or class that handled the request.
774
+ # Corresponds to the JSON property `urlMapEntry`
775
+ # @return [String]
776
+ attr_accessor :url_map_entry
777
+
778
+ # Internet host and port number of the resource being requested.
779
+ # Corresponds to the JSON property `host`
780
+ # @return [String]
781
+ attr_accessor :host
782
+
783
+ # An indication of the relative cost of serving this request.
784
+ # Corresponds to the JSON property `cost`
785
+ # @return [Float]
786
+ attr_accessor :cost
787
+
788
+ # Queue name of the request, in the case of an offline request.
789
+ # Corresponds to the JSON property `taskQueueName`
790
+ # @return [String]
791
+ attr_accessor :task_queue_name
792
+
793
+ # Task name of the request, in the case of an offline request.
794
+ # Corresponds to the JSON property `taskName`
795
+ # @return [String]
796
+ attr_accessor :task_name
797
+
798
+ # Whether this was a loading request for the instance.
799
+ # Corresponds to the JSON property `wasLoadingRequest`
800
+ # @return [Boolean]
801
+ attr_accessor :was_loading_request
802
+ alias_method :was_loading_request?, :was_loading_request
803
+
804
+ # Time this request spent in the pending request queue.
805
+ # Corresponds to the JSON property `pendingTime`
806
+ # @return [String]
807
+ attr_accessor :pending_time
808
+
809
+ # If the instance processing this request belongs to a manually scaled module,
810
+ # then this is the 0-based index of the instance. Otherwise, this value is -1.
811
+ # Corresponds to the JSON property `instanceIndex`
812
+ # @return [Fixnum]
813
+ attr_accessor :instance_index
814
+
815
+ # Whether this request is finished or active.
816
+ # Corresponds to the JSON property `finished`
817
+ # @return [Boolean]
818
+ attr_accessor :finished
819
+ alias_method :finished?, :finished
820
+
821
+ # An identifier for the instance that handled the request.
822
+ # Corresponds to the JSON property `instanceId`
823
+ # @return [String]
824
+ attr_accessor :instance_id
825
+
826
+ # A list of log lines emitted by the application while serving this request.
827
+ # Corresponds to the JSON property `line`
828
+ # @return [Array<Google::Apis::LoggingV2beta1::LogLine>]
829
+ attr_accessor :line
830
+
831
+ # App Engine release version.
832
+ # Corresponds to the JSON property `appEngineRelease`
833
+ # @return [String]
834
+ attr_accessor :app_engine_release
835
+
836
+ # Cloud Trace identifier for this request.
837
+ # Corresponds to the JSON property `traceId`
838
+ # @return [String]
839
+ attr_accessor :trace_id
840
+
841
+ # Source code for the application that handled this request. There can be more
842
+ # than one source reference per deployed application if source code is
843
+ # distributed among multiple repositories.
844
+ # Corresponds to the JSON property `sourceReference`
845
+ # @return [Array<Google::Apis::LoggingV2beta1::SourceReference>]
846
+ attr_accessor :source_reference
847
+
848
+ def initialize(**args)
849
+ update!(**args)
850
+ end
851
+
852
+ # Update properties of this object
853
+ def update!(**args)
854
+ @app_id = args[:app_id] if args.key?(:app_id)
855
+ @module_id = args[:module_id] if args.key?(:module_id)
856
+ @version_id = args[:version_id] if args.key?(:version_id)
857
+ @request_id = args[:request_id] if args.key?(:request_id)
858
+ @ip = args[:ip] if args.key?(:ip)
859
+ @start_time = args[:start_time] if args.key?(:start_time)
860
+ @end_time = args[:end_time] if args.key?(:end_time)
861
+ @latency = args[:latency] if args.key?(:latency)
862
+ @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles)
863
+ @method_prop = args[:method_prop] if args.key?(:method_prop)
864
+ @resource = args[:resource] if args.key?(:resource)
865
+ @http_version = args[:http_version] if args.key?(:http_version)
866
+ @status = args[:status] if args.key?(:status)
867
+ @response_size = args[:response_size] if args.key?(:response_size)
868
+ @referrer = args[:referrer] if args.key?(:referrer)
869
+ @user_agent = args[:user_agent] if args.key?(:user_agent)
870
+ @nickname = args[:nickname] if args.key?(:nickname)
871
+ @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry)
872
+ @host = args[:host] if args.key?(:host)
873
+ @cost = args[:cost] if args.key?(:cost)
874
+ @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name)
875
+ @task_name = args[:task_name] if args.key?(:task_name)
876
+ @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request)
877
+ @pending_time = args[:pending_time] if args.key?(:pending_time)
878
+ @instance_index = args[:instance_index] if args.key?(:instance_index)
879
+ @finished = args[:finished] if args.key?(:finished)
880
+ @instance_id = args[:instance_id] if args.key?(:instance_id)
881
+ @line = args[:line] if args.key?(:line)
882
+ @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release)
883
+ @trace_id = args[:trace_id] if args.key?(:trace_id)
884
+ @source_reference = args[:source_reference] if args.key?(:source_reference)
885
+ end
886
+ end
887
+
888
+ # Application log line emitted while processing a request.
889
+ class LogLine
890
+ include Google::Apis::Core::Hashable
891
+
892
+ # Approximate time when this log entry was made.
893
+ # Corresponds to the JSON property `time`
894
+ # @return [String]
895
+ attr_accessor :time
896
+
897
+ # Severity of this log entry.
898
+ # Corresponds to the JSON property `severity`
899
+ # @return [String]
900
+ attr_accessor :severity
901
+
902
+ # App-provided log message.
903
+ # Corresponds to the JSON property `logMessage`
904
+ # @return [String]
905
+ attr_accessor :log_message
906
+
907
+ # Specifies a location in a source code file.
908
+ # Corresponds to the JSON property `sourceLocation`
909
+ # @return [Google::Apis::LoggingV2beta1::SourceLocation]
910
+ attr_accessor :source_location
911
+
912
+ def initialize(**args)
913
+ update!(**args)
914
+ end
915
+
916
+ # Update properties of this object
917
+ def update!(**args)
918
+ @time = args[:time] if args.key?(:time)
919
+ @severity = args[:severity] if args.key?(:severity)
920
+ @log_message = args[:log_message] if args.key?(:log_message)
921
+ @source_location = args[:source_location] if args.key?(:source_location)
922
+ end
923
+ end
924
+
925
+ # Specifies a location in a source code file.
926
+ class SourceLocation
927
+ include Google::Apis::Core::Hashable
928
+
929
+ # Source file name. Depending on the runtime environment, this might be a simple
930
+ # name or a fully-qualified name.
931
+ # Corresponds to the JSON property `file`
932
+ # @return [String]
933
+ attr_accessor :file
934
+
935
+ # Line within the source file.
936
+ # Corresponds to the JSON property `line`
937
+ # @return [String]
938
+ attr_accessor :line
939
+
940
+ # Human-readable name of the function or method being invoked, with optional
941
+ # context such as the class or package name. This information is used in
942
+ # contexts such as the logs viewer, where a file and line number are less
943
+ # meaningful. The format can vary by language. For example: `qual.if.ied.Class.
944
+ # method` (Java), `dir/package.func` (Go), `function` (Python).
945
+ # Corresponds to the JSON property `functionName`
946
+ # @return [String]
947
+ attr_accessor :function_name
948
+
949
+ def initialize(**args)
950
+ update!(**args)
951
+ end
952
+
953
+ # Update properties of this object
954
+ def update!(**args)
955
+ @file = args[:file] if args.key?(:file)
956
+ @line = args[:line] if args.key?(:line)
957
+ @function_name = args[:function_name] if args.key?(:function_name)
958
+ end
959
+ end
960
+
961
+ # A reference to a particular snapshot of the source tree used to build and
962
+ # deploy an application.
963
+ class SourceReference
964
+ include Google::Apis::Core::Hashable
965
+
966
+ # Optional. A URI string identifying the repository. Example: "https://github.
967
+ # com/GoogleCloudPlatform/kubernetes.git"
968
+ # Corresponds to the JSON property `repository`
969
+ # @return [String]
970
+ attr_accessor :repository
971
+
972
+ # The canonical and persistent identifier of the deployed revision. Example (git)
973
+ # : "0035781c50ec7aa23385dc841529ce8a4b70db1b"
974
+ # Corresponds to the JSON property `revisionId`
975
+ # @return [String]
976
+ attr_accessor :revision_id
977
+
978
+ def initialize(**args)
979
+ update!(**args)
980
+ end
981
+
982
+ # Update properties of this object
983
+ def update!(**args)
984
+ @repository = args[:repository] if args.key?(:repository)
985
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
986
+ end
987
+ end
988
+ end
989
+ end
990
+ end