google-api-client 0.11.1 → 0.11.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 (252) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/api_names.yaml +42335 -1
  4. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +3 -3
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +28 -28
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +12 -12
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +2 -2
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +757 -757
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +162 -162
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +48 -48
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +75 -7
  14. data/generated/google/apis/admin_directory_v1/representations.rb +20 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +61 -61
  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 +403 -403
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  21. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  22. data/generated/google/apis/androidenterprise_v1/classes.rb +36 -11
  23. data/generated/google/apis/androidenterprise_v1/representations.rb +2 -0
  24. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  25. data/generated/google/apis/appengine_v1.rb +6 -5
  26. data/generated/google/apis/appengine_v1/classes.rb +1429 -1421
  27. data/generated/google/apis/appengine_v1/representations.rb +331 -331
  28. data/generated/google/apis/appengine_v1/service.rb +173 -168
  29. data/generated/google/apis/appstate_v1.rb +1 -1
  30. data/generated/google/apis/bigquery_v2.rb +1 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudbuild_v1/classes.rb +624 -618
  36. data/generated/google/apis/cloudbuild_v1/representations.rb +126 -125
  37. data/generated/google/apis/cloudbuild_v1/service.rb +87 -87
  38. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  39. data/generated/google/apis/clouddebugger_v2/classes.rb +267 -267
  40. data/generated/google/apis/clouddebugger_v2/representations.rb +83 -83
  41. data/generated/google/apis/clouddebugger_v2/service.rb +137 -137
  42. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  43. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +131 -131
  44. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +28 -28
  45. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +17 -17
  46. data/generated/google/apis/cloudfunctions_v1.rb +1 -4
  47. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -47
  48. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -17
  49. data/generated/google/apis/cloudfunctions_v1/service.rb +0 -30
  50. data/generated/google/apis/cloudkms_v1.rb +1 -1
  51. data/generated/google/apis/cloudkms_v1/classes.rb +625 -625
  52. data/generated/google/apis/cloudkms_v1/representations.rb +132 -132
  53. data/generated/google/apis/cloudkms_v1/service.rb +272 -272
  54. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +242 -242
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +43 -43
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +505 -505
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +172 -172
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +39 -39
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +310 -310
  63. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +96 -69
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +16 -16
  66. data/generated/google/apis/cloudtrace_v1/service.rb +42 -15
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +194 -25
  69. data/generated/google/apis/compute_beta/representations.rb +42 -0
  70. data/generated/google/apis/compute_beta/service.rb +196 -100
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +69 -18
  73. data/generated/google/apis/compute_v1/representations.rb +16 -0
  74. data/generated/google/apis/compute_v1/service.rb +84 -26
  75. data/generated/google/apis/container_v1.rb +3 -3
  76. data/generated/google/apis/container_v1/classes.rb +794 -586
  77. data/generated/google/apis/container_v1/representations.rb +202 -118
  78. data/generated/google/apis/container_v1/service.rb +396 -167
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +4 -4
  81. data/generated/google/apis/dataproc_v1.rb +1 -1
  82. data/generated/google/apis/dataproc_v1/classes.rb +487 -484
  83. data/generated/google/apis/dataproc_v1/representations.rb +83 -83
  84. data/generated/google/apis/dataproc_v1/service.rb +299 -297
  85. data/generated/google/apis/datastore_v1.rb +1 -1
  86. data/generated/google/apis/datastore_v1/classes.rb +703 -703
  87. data/generated/google/apis/datastore_v1/representations.rb +148 -148
  88. data/generated/google/apis/datastore_v1/service.rb +62 -62
  89. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  90. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -5
  91. data/generated/google/apis/dfareporting_v2_6.rb +1 -1
  92. data/generated/google/apis/dfareporting_v2_6/classes.rb +66 -53
  93. data/generated/google/apis/dfareporting_v2_6/service.rb +30 -30
  94. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  95. data/generated/google/apis/dfareporting_v2_7/classes.rb +69 -55
  96. data/generated/google/apis/dfareporting_v2_7/service.rb +38 -37
  97. data/generated/google/apis/dfareporting_v2_8.rb +40 -0
  98. data/generated/google/apis/dfareporting_v2_8/classes.rb +12046 -0
  99. data/generated/google/apis/dfareporting_v2_8/representations.rb +4310 -0
  100. data/generated/google/apis/dfareporting_v2_8/service.rb +9135 -0
  101. data/generated/google/apis/dns_v1.rb +1 -1
  102. data/generated/google/apis/dns_v2beta1.rb +1 -1
  103. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2.rb +1 -1
  105. data/generated/google/apis/drive_v2/classes.rb +15 -0
  106. data/generated/google/apis/drive_v2/representations.rb +2 -0
  107. data/generated/google/apis/drive_v2/service.rb +2 -1
  108. data/generated/google/apis/drive_v3.rb +1 -1
  109. data/generated/google/apis/drive_v3/classes.rb +16 -0
  110. data/generated/google/apis/drive_v3/representations.rb +2 -0
  111. data/generated/google/apis/drive_v3/service.rb +2 -1
  112. data/generated/google/apis/firebasedynamiclinks_v1.rb +2 -3
  113. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +159 -159
  114. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +55 -55
  115. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +5 -6
  116. data/generated/google/apis/firebaserules_v1.rb +1 -1
  117. data/generated/google/apis/firebaserules_v1/classes.rb +73 -73
  118. data/generated/google/apis/firebaserules_v1/representations.rb +25 -25
  119. data/generated/google/apis/firebaserules_v1/service.rb +118 -118
  120. data/generated/google/apis/fusiontables_v2.rb +1 -1
  121. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  122. data/generated/google/apis/games_management_v1management.rb +1 -1
  123. data/generated/google/apis/games_v1.rb +1 -1
  124. data/generated/google/apis/genomics_v1.rb +1 -1
  125. data/generated/google/apis/genomics_v1/classes.rb +920 -920
  126. data/generated/google/apis/genomics_v1/representations.rb +202 -202
  127. data/generated/google/apis/genomics_v1/service.rb +1092 -1092
  128. data/generated/google/apis/gmail_v1.rb +1 -1
  129. data/generated/google/apis/iam_v1.rb +1 -1
  130. data/generated/google/apis/iam_v1/classes.rb +455 -435
  131. data/generated/google/apis/iam_v1/representations.rb +96 -93
  132. data/generated/google/apis/iam_v1/service.rb +157 -157
  133. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  134. data/generated/google/apis/identitytoolkit_v3/classes.rb +12 -0
  135. data/generated/google/apis/identitytoolkit_v3/representations.rb +2 -0
  136. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  137. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  138. data/generated/google/apis/kgsearch_v1/service.rb +9 -9
  139. data/generated/google/apis/language_v1.rb +1 -1
  140. data/generated/google/apis/language_v1/classes.rb +455 -455
  141. data/generated/google/apis/language_v1/representations.rb +102 -102
  142. data/generated/google/apis/language_v1/service.rb +42 -42
  143. data/generated/google/apis/language_v1beta1.rb +1 -1
  144. data/generated/google/apis/language_v1beta1/classes.rb +216 -215
  145. data/generated/google/apis/language_v1beta1/representations.rb +75 -75
  146. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  147. data/generated/google/apis/logging_v2.rb +1 -1
  148. data/generated/google/apis/logging_v2/classes.rb +908 -895
  149. data/generated/google/apis/logging_v2/representations.rb +121 -120
  150. data/generated/google/apis/logging_v2/service.rb +489 -489
  151. data/generated/google/apis/logging_v2beta1.rb +4 -4
  152. data/generated/google/apis/logging_v2beta1/classes.rb +928 -915
  153. data/generated/google/apis/logging_v2beta1/representations.rb +121 -120
  154. data/generated/google/apis/logging_v2beta1/service.rb +249 -249
  155. data/generated/google/apis/manufacturers_v1.rb +1 -1
  156. data/generated/google/apis/manufacturers_v1/classes.rb +294 -294
  157. data/generated/google/apis/manufacturers_v1/representations.rb +84 -84
  158. data/generated/google/apis/manufacturers_v1/service.rb +8 -8
  159. data/generated/google/apis/mirror_v1.rb +1 -1
  160. data/generated/google/apis/ml_v1.rb +1 -1
  161. data/generated/google/apis/ml_v1/classes.rb +1186 -1183
  162. data/generated/google/apis/ml_v1/representations.rb +177 -177
  163. data/generated/google/apis/ml_v1/service.rb +244 -244
  164. data/generated/google/apis/monitoring_v3.rb +1 -1
  165. data/generated/google/apis/monitoring_v3/classes.rb +866 -866
  166. data/generated/google/apis/monitoring_v3/representations.rb +163 -163
  167. data/generated/google/apis/monitoring_v3/service.rb +355 -316
  168. data/generated/google/apis/oauth2_v2.rb +1 -1
  169. data/generated/google/apis/partners_v2.rb +1 -1
  170. data/generated/google/apis/partners_v2/classes.rb +1499 -1499
  171. data/generated/google/apis/partners_v2/representations.rb +368 -368
  172. data/generated/google/apis/partners_v2/service.rb +512 -512
  173. data/generated/google/apis/people_v1.rb +10 -10
  174. data/generated/google/apis/people_v1/classes.rb +544 -423
  175. data/generated/google/apis/people_v1/representations.rb +127 -109
  176. data/generated/google/apis/people_v1/service.rb +8 -8
  177. data/generated/google/apis/plus_domains_v1.rb +1 -1
  178. data/generated/google/apis/plus_v1.rb +1 -1
  179. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  180. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +200 -200
  181. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +41 -41
  182. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +80 -80
  183. data/generated/google/apis/pubsub_v1.rb +1 -1
  184. data/generated/google/apis/pubsub_v1/classes.rb +377 -377
  185. data/generated/google/apis/pubsub_v1/representations.rb +82 -82
  186. data/generated/google/apis/pubsub_v1/service.rb +93 -93
  187. data/generated/google/apis/runtimeconfig_v1.rb +6 -4
  188. data/generated/google/apis/runtimeconfig_v1/classes.rb +22 -22
  189. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  190. data/generated/google/apis/runtimeconfig_v1/service.rb +57 -55
  191. data/generated/google/apis/script_v1.rb +14 -14
  192. data/generated/google/apis/script_v1/classes.rb +113 -58
  193. data/generated/google/apis/script_v1/representations.rb +43 -14
  194. data/generated/google/apis/script_v1/service.rb +6 -6
  195. data/generated/google/apis/searchconsole_v1.rb +1 -1
  196. data/generated/google/apis/searchconsole_v1/classes.rb +67 -67
  197. data/generated/google/apis/searchconsole_v1/representations.rb +29 -29
  198. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  199. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  200. data/generated/google/apis/servicecontrol_v1/classes.rb +1125 -1125
  201. data/generated/google/apis/servicecontrol_v1/representations.rb +213 -213
  202. data/generated/google/apis/servicecontrol_v1/service.rb +92 -92
  203. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  204. data/generated/google/apis/servicemanagement_v1/classes.rb +3364 -3622
  205. data/generated/google/apis/servicemanagement_v1/representations.rb +546 -530
  206. data/generated/google/apis/servicemanagement_v1/service.rb +262 -152
  207. data/generated/google/apis/serviceuser_v1.rb +4 -4
  208. data/generated/google/apis/serviceuser_v1/classes.rb +2616 -2874
  209. data/generated/google/apis/serviceuser_v1/representations.rb +294 -278
  210. data/generated/google/apis/serviceuser_v1/service.rb +19 -19
  211. data/generated/google/apis/sheets_v4.rb +4 -1
  212. data/generated/google/apis/sheets_v4/classes.rb +4315 -4313
  213. data/generated/google/apis/sheets_v4/representations.rb +858 -858
  214. data/generated/google/apis/sheets_v4/service.rb +115 -115
  215. data/generated/google/apis/slides_v1.rb +1 -1
  216. data/generated/google/apis/slides_v1/classes.rb +2890 -2890
  217. data/generated/google/apis/slides_v1/representations.rb +638 -638
  218. data/generated/google/apis/slides_v1/service.rb +36 -36
  219. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  220. data/generated/google/apis/sourcerepo_v1/classes.rb +283 -283
  221. data/generated/google/apis/sourcerepo_v1/representations.rb +67 -67
  222. data/generated/google/apis/sourcerepo_v1/service.rb +88 -88
  223. data/generated/google/apis/spanner_v1.rb +1 -1
  224. data/generated/google/apis/spanner_v1/classes.rb +2258 -2233
  225. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  226. data/generated/google/apis/spanner_v1/service.rb +466 -466
  227. data/generated/google/apis/speech_v1beta1.rb +2 -2
  228. data/generated/google/apis/speech_v1beta1/classes.rb +97 -97
  229. data/generated/google/apis/speech_v1beta1/representations.rb +29 -29
  230. data/generated/google/apis/speech_v1beta1/service.rb +49 -49
  231. data/generated/google/apis/storage_v1.rb +1 -1
  232. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  233. data/generated/google/apis/storagetransfer_v1/classes.rb +786 -786
  234. data/generated/google/apis/storagetransfer_v1/representations.rb +133 -133
  235. data/generated/google/apis/storagetransfer_v1/service.rb +30 -30
  236. data/generated/google/apis/surveys_v2.rb +1 -1
  237. data/generated/google/apis/surveys_v2/classes.rb +0 -12
  238. data/generated/google/apis/surveys_v2/representations.rb +0 -4
  239. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  240. data/generated/google/apis/vision_v1.rb +1 -1
  241. data/generated/google/apis/vision_v1/classes.rb +1301 -1302
  242. data/generated/google/apis/vision_v1/representations.rb +183 -183
  243. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_partner_v1/classes.rb +10 -0
  246. data/generated/google/apis/youtube_partner_v1/representations.rb +1 -0
  247. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  248. data/generated/google/apis/youtubereporting_v1/classes.rb +64 -64
  249. data/generated/google/apis/youtubereporting_v1/representations.rb +12 -12
  250. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  251. data/lib/google/apis/version.rb +1 -1
  252. metadata +7 -3
@@ -22,6 +22,36 @@ module Google
22
22
  module Apis
23
23
  module LoggingV2beta1
24
24
 
25
+ class ListLogMetricsResponse
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class Empty
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
37
+ class LogEntry
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class SourceLocation
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class ListLogEntriesRequest
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
25
55
  class RequestLog
26
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
57
 
@@ -40,13 +70,13 @@ module Google
40
70
  include Google::Apis::Core::JsonObjectSupport
41
71
  end
42
72
 
43
- class LogMetric
73
+ class LogEntryOperation
44
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
75
 
46
76
  include Google::Apis::Core::JsonObjectSupport
47
77
  end
48
78
 
49
- class LogEntryOperation
79
+ class LogMetric
50
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
81
 
52
82
  include Google::Apis::Core::JsonObjectSupport
@@ -82,13 +112,13 @@ module Google
82
112
  include Google::Apis::Core::JsonObjectSupport
83
113
  end
84
114
 
85
- class HttpRequest
115
+ class ListSinksResponse
86
116
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
117
 
88
118
  include Google::Apis::Core::JsonObjectSupport
89
119
  end
90
120
 
91
- class ListSinksResponse
121
+ class HttpRequest
92
122
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
123
 
94
124
  include Google::Apis::Core::JsonObjectSupport
@@ -125,48 +155,67 @@ module Google
125
155
  end
126
156
 
127
157
  class ListLogMetricsResponse
128
- class Representation < Google::Apis::Core::JsonRepresentation; end
158
+ # @private
159
+ class Representation < Google::Apis::Core::JsonRepresentation
160
+ collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation
129
161
 
130
- include Google::Apis::Core::JsonObjectSupport
162
+ property :next_page_token, as: 'nextPageToken'
163
+ end
131
164
  end
132
165
 
133
166
  class Empty
134
- class Representation < Google::Apis::Core::JsonRepresentation; end
135
-
136
- include Google::Apis::Core::JsonObjectSupport
167
+ # @private
168
+ class Representation < Google::Apis::Core::JsonRepresentation
169
+ end
137
170
  end
138
171
 
139
172
  class LogEntry
140
- class Representation < Google::Apis::Core::JsonRepresentation; end
173
+ # @private
174
+ class Representation < Google::Apis::Core::JsonRepresentation
175
+ property :timestamp, as: 'timestamp'
176
+ property :log_name, as: 'logName'
177
+ property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation
141
178
 
142
- include Google::Apis::Core::JsonObjectSupport
179
+ property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation
180
+
181
+ hash :json_payload, as: 'jsonPayload'
182
+ property :insert_id, as: 'insertId'
183
+ property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation
184
+
185
+ property :text_payload, as: 'textPayload'
186
+ hash :proto_payload, as: 'protoPayload'
187
+ hash :labels, as: 'labels'
188
+ property :trace, as: 'trace'
189
+ property :severity, as: 'severity'
190
+ property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation
191
+
192
+ end
143
193
  end
144
194
 
145
195
  class SourceLocation
146
- class Representation < Google::Apis::Core::JsonRepresentation; end
147
-
148
- include Google::Apis::Core::JsonObjectSupport
196
+ # @private
197
+ class Representation < Google::Apis::Core::JsonRepresentation
198
+ property :file, as: 'file'
199
+ property :function_name, as: 'functionName'
200
+ property :line, :numeric_string => true, as: 'line'
201
+ end
149
202
  end
150
203
 
151
204
  class ListLogEntriesRequest
152
- class Representation < Google::Apis::Core::JsonRepresentation; end
153
-
154
- include Google::Apis::Core::JsonObjectSupport
205
+ # @private
206
+ class Representation < Google::Apis::Core::JsonRepresentation
207
+ property :order_by, as: 'orderBy'
208
+ collection :resource_names, as: 'resourceNames'
209
+ collection :project_ids, as: 'projectIds'
210
+ property :filter, as: 'filter'
211
+ property :page_token, as: 'pageToken'
212
+ property :page_size, as: 'pageSize'
213
+ end
155
214
  end
156
215
 
157
216
  class RequestLog
158
217
  # @private
159
218
  class Representation < Google::Apis::Core::JsonRepresentation
160
- property :request_id, as: 'requestId'
161
- property :nickname, as: 'nickname'
162
- property :status, as: 'status'
163
- property :pending_time, as: 'pendingTime'
164
- property :resource, as: 'resource'
165
- property :task_name, as: 'taskName'
166
- property :url_map_entry, as: 'urlMapEntry'
167
- property :instance_index, as: 'instanceIndex'
168
- property :finished, as: 'finished'
169
- property :host, as: 'host'
170
219
  property :http_version, as: 'httpVersion'
171
220
  property :start_time, as: 'startTime'
172
221
  property :latency, as: 'latency'
@@ -191,6 +240,16 @@ module Google
191
240
 
192
241
  property :referrer, as: 'referrer'
193
242
  property :task_queue_name, as: 'taskQueueName'
243
+ property :request_id, as: 'requestId'
244
+ property :nickname, as: 'nickname'
245
+ property :pending_time, as: 'pendingTime'
246
+ property :resource, as: 'resource'
247
+ property :status, as: 'status'
248
+ property :task_name, as: 'taskName'
249
+ property :url_map_entry, as: 'urlMapEntry'
250
+ property :instance_index, as: 'instanceIndex'
251
+ property :finished, as: 'finished'
252
+ property :host, as: 'host'
194
253
  end
195
254
  end
196
255
 
@@ -206,18 +265,8 @@ module Google
206
265
  class SourceReference
207
266
  # @private
208
267
  class Representation < Google::Apis::Core::JsonRepresentation
209
- property :revision_id, as: 'revisionId'
210
268
  property :repository, as: 'repository'
211
- end
212
- end
213
-
214
- class LogMetric
215
- # @private
216
- class Representation < Google::Apis::Core::JsonRepresentation
217
- property :version, as: 'version'
218
- property :filter, as: 'filter'
219
- property :name, as: 'name'
220
- property :description, as: 'description'
269
+ property :revision_id, as: 'revisionId'
221
270
  end
222
271
  end
223
272
 
@@ -231,6 +280,16 @@ module Google
231
280
  end
232
281
  end
233
282
 
283
+ class LogMetric
284
+ # @private
285
+ class Representation < Google::Apis::Core::JsonRepresentation
286
+ property :name, as: 'name'
287
+ property :description, as: 'description'
288
+ property :version, as: 'version'
289
+ property :filter, as: 'filter'
290
+ end
291
+ end
292
+
234
293
  class WriteLogEntriesResponse
235
294
  # @private
236
295
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -240,8 +299,8 @@ module Google
240
299
  class MonitoredResource
241
300
  # @private
242
301
  class Representation < Google::Apis::Core::JsonRepresentation
243
- hash :labels, as: 'labels'
244
302
  property :type, as: 'type'
303
+ hash :labels, as: 'labels'
245
304
  end
246
305
  end
247
306
 
@@ -261,33 +320,37 @@ module Google
261
320
  class LogSink
262
321
  # @private
263
322
  class Representation < Google::Apis::Core::JsonRepresentation
323
+ property :destination, as: 'destination'
324
+ property :filter, as: 'filter'
325
+ property :end_time, as: 'endTime'
264
326
  property :start_time, as: 'startTime'
265
327
  property :writer_identity, as: 'writerIdentity'
266
328
  property :output_version_format, as: 'outputVersionFormat'
267
329
  property :name, as: 'name'
268
- property :destination, as: 'destination'
269
- property :filter, as: 'filter'
270
- property :end_time, as: 'endTime'
330
+ property :include_children, as: 'includeChildren'
271
331
  end
272
332
  end
273
333
 
274
334
  class ListLogsResponse
275
335
  # @private
276
336
  class Representation < Google::Apis::Core::JsonRepresentation
277
- property :next_page_token, as: 'nextPageToken'
278
337
  collection :log_names, as: 'logNames'
338
+ property :next_page_token, as: 'nextPageToken'
339
+ end
340
+ end
341
+
342
+ class ListSinksResponse
343
+ # @private
344
+ class Representation < Google::Apis::Core::JsonRepresentation
345
+ property :next_page_token, as: 'nextPageToken'
346
+ collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation
347
+
279
348
  end
280
349
  end
281
350
 
282
351
  class HttpRequest
283
352
  # @private
284
353
  class Representation < Google::Apis::Core::JsonRepresentation
285
- property :user_agent, as: 'userAgent'
286
- property :latency, as: 'latency'
287
- property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes'
288
- property :request_method, as: 'requestMethod'
289
- property :request_size, :numeric_string => true, as: 'requestSize'
290
- property :response_size, :numeric_string => true, as: 'responseSize'
291
354
  property :request_url, as: 'requestUrl'
292
355
  property :server_ip, as: 'serverIp'
293
356
  property :remote_ip, as: 'remoteIp'
@@ -296,36 +359,33 @@ module Google
296
359
  property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer'
297
360
  property :status, as: 'status'
298
361
  property :referer, as: 'referer'
299
- end
300
- end
301
-
302
- class ListSinksResponse
303
- # @private
304
- class Representation < Google::Apis::Core::JsonRepresentation
305
- collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation
306
-
307
- property :next_page_token, as: 'nextPageToken'
362
+ property :user_agent, as: 'userAgent'
363
+ property :latency, as: 'latency'
364
+ property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes'
365
+ property :request_method, as: 'requestMethod'
366
+ property :request_size, :numeric_string => true, as: 'requestSize'
367
+ property :response_size, :numeric_string => true, as: 'responseSize'
308
368
  end
309
369
  end
310
370
 
311
371
  class LabelDescriptor
312
372
  # @private
313
373
  class Representation < Google::Apis::Core::JsonRepresentation
314
- property :key, as: 'key'
315
374
  property :description, as: 'description'
316
375
  property :value_type, as: 'valueType'
376
+ property :key, as: 'key'
317
377
  end
318
378
  end
319
379
 
320
380
  class MonitoredResourceDescriptor
321
381
  # @private
322
382
  class Representation < Google::Apis::Core::JsonRepresentation
383
+ property :type, as: 'type'
323
384
  collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation
324
385
 
325
386
  property :name, as: 'name'
326
387
  property :display_name, as: 'displayName'
327
388
  property :description, as: 'description'
328
- property :type, as: 'type'
329
389
  end
330
390
  end
331
391
 
@@ -350,70 +410,11 @@ module Google
350
410
  class LogLine
351
411
  # @private
352
412
  class Representation < Google::Apis::Core::JsonRepresentation
353
- property :severity, as: 'severity'
354
- property :log_message, as: 'logMessage'
355
413
  property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation
356
414
 
357
415
  property :time, as: 'time'
358
- end
359
- end
360
-
361
- class ListLogMetricsResponse
362
- # @private
363
- class Representation < Google::Apis::Core::JsonRepresentation
364
- property :next_page_token, as: 'nextPageToken'
365
- collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation
366
-
367
- end
368
- end
369
-
370
- class Empty
371
- # @private
372
- class Representation < Google::Apis::Core::JsonRepresentation
373
- end
374
- end
375
-
376
- class LogEntry
377
- # @private
378
- class Representation < Google::Apis::Core::JsonRepresentation
379
- property :log_name, as: 'logName'
380
- property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation
381
-
382
- property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation
383
-
384
- hash :json_payload, as: 'jsonPayload'
385
- property :insert_id, as: 'insertId'
386
- property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation
387
-
388
- property :text_payload, as: 'textPayload'
389
- hash :proto_payload, as: 'protoPayload'
390
- property :trace, as: 'trace'
391
- hash :labels, as: 'labels'
392
416
  property :severity, as: 'severity'
393
- property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation
394
-
395
- property :timestamp, as: 'timestamp'
396
- end
397
- end
398
-
399
- class SourceLocation
400
- # @private
401
- class Representation < Google::Apis::Core::JsonRepresentation
402
- property :file, as: 'file'
403
- property :function_name, as: 'functionName'
404
- property :line, :numeric_string => true, as: 'line'
405
- end
406
- end
407
-
408
- class ListLogEntriesRequest
409
- # @private
410
- class Representation < Google::Apis::Core::JsonRepresentation
411
- property :order_by, as: 'orderBy'
412
- collection :resource_names, as: 'resourceNames'
413
- property :filter, as: 'filter'
414
- collection :project_ids, as: 'projectIds'
415
- property :page_token, as: 'pageToken'
416
- property :page_size, as: 'pageSize'
417
+ property :log_message, as: 'logMessage'
417
418
  end
418
419
  end
419
420
  end
@@ -32,202 +32,255 @@ module Google
32
32
  #
33
33
  # @see https://cloud.google.com/logging/docs/
34
34
  class LoggingService < Google::Apis::Core::BaseService
35
- # @return [String]
36
- # Available to use for quota purposes for server-side applications. Can be any
37
- # arbitrary string assigned to a user, but should not exceed 40 characters.
38
- attr_accessor :quota_user
39
-
40
35
  # @return [String]
41
36
  # API key. Your API key identifies your project and provides you with API access,
42
37
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
43
38
  attr_accessor :key
44
39
 
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
45
  def initialize
46
46
  super('https://logging.googleapis.com/', '')
47
47
  @batch_path = 'batch'
48
48
  end
49
49
 
50
- # Lists the descriptors for monitored resource types used by Stackdriver Logging.
51
- # @param [String] page_token
52
- # Optional. If present, then retrieve the next batch of results from the
53
- # preceding call to this method. pageToken must be the value of nextPageToken
54
- # from the previous response. The values of other method parameters should be
55
- # identical to those in the previous call.
56
- # @param [Fixnum] page_size
57
- # Optional. The maximum number of results to return from this request. Non-
58
- # positive values are ignored. The presence of nextPageToken in the response
59
- # indicates that more results might be available.
50
+ # Lists log entries. Use this method to retrieve log entries from Stackdriver
51
+ # Logging. For ways to export log entries, see Exporting Logs.
52
+ # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
53
+ # @param [String] fields
54
+ # Selector specifying which fields to include in a partial response.
60
55
  # @param [String] quota_user
61
56
  # Available to use for quota purposes for server-side applications. Can be any
62
57
  # arbitrary string assigned to a user, but should not exceed 40 characters.
63
- # @param [String] fields
64
- # Selector specifying which fields to include in a partial response.
65
58
  # @param [Google::Apis::RequestOptions] options
66
59
  # Request-specific options
67
60
  #
68
61
  # @yield [result, err] Result & error if block supplied
69
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object
62
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
70
63
  # @yieldparam err [StandardError] error object if request failed
71
64
  #
72
- # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse]
65
+ # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
73
66
  #
74
67
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
68
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
69
  # @raise [Google::Apis::AuthorizationError] Authorization is required
77
- def list_monitored_resource_descriptors(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
78
- command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options)
79
- command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation
80
- command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse
81
- command.query['pageToken'] = page_token unless page_token.nil?
82
- command.query['pageSize'] = page_size unless page_size.nil?
83
- command.query['quotaUser'] = quota_user unless quota_user.nil?
70
+ def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
71
+ command = make_simple_command(:post, 'v2beta1/entries:list', options)
72
+ command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
73
+ command.request_object = list_log_entries_request_object
74
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
75
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
84
76
  command.query['fields'] = fields unless fields.nil?
77
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
85
78
  execute_or_queue_command(command, &block)
86
79
  end
87
80
 
88
- # Deletes all the log entries in a log. The log reappears if it receives new
89
- # entries. Log entries written shortly before the delete operation might not be
90
- # deleted.
91
- # @param [String] log_name
92
- # Required. The resource name of the log to delete:
93
- # "projects/[PROJECT_ID]/logs/[LOG_ID]"
94
- # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
95
- # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
96
- # "folders/[FOLDER_ID]/logs/[LOG_ID]"
97
- # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
98
- # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
99
- # 2Factivity". For more information about log names, see LogEntry.
81
+ # Writes log entries to Stackdriver Logging.
82
+ # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object
83
+ # @param [String] fields
84
+ # Selector specifying which fields to include in a partial response.
100
85
  # @param [String] quota_user
101
86
  # Available to use for quota purposes for server-side applications. Can be any
102
87
  # arbitrary string assigned to a user, but should not exceed 40 characters.
103
- # @param [String] fields
104
- # Selector specifying which fields to include in a partial response.
105
88
  # @param [Google::Apis::RequestOptions] options
106
89
  # Request-specific options
107
90
  #
108
91
  # @yield [result, err] Result & error if block supplied
109
- # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
92
+ # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object
110
93
  # @yieldparam err [StandardError] error object if request failed
111
94
  #
112
- # @return [Google::Apis::LoggingV2beta1::Empty]
95
+ # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse]
113
96
  #
114
97
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
98
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
99
  # @raise [Google::Apis::AuthorizationError] Authorization is required
117
- def delete_organization_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
118
- command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
119
- command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
120
- command.response_class = Google::Apis::LoggingV2beta1::Empty
121
- command.params['logName'] = log_name unless log_name.nil?
122
- command.query['quotaUser'] = quota_user unless quota_user.nil?
100
+ def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
101
+ command = make_simple_command(:post, 'v2beta1/entries:write', options)
102
+ command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation
103
+ command.request_object = write_log_entries_request_object
104
+ command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation
105
+ command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse
123
106
  command.query['fields'] = fields unless fields.nil?
107
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
124
108
  execute_or_queue_command(command, &block)
125
109
  end
126
110
 
127
- # Lists the logs in projects, organizations, folders, or billing accounts. Only
128
- # logs that have entries are listed.
111
+ # Lists logs-based metrics.
129
112
  # @param [String] parent
130
- # Required. The resource name that owns the logs:
113
+ # Required. The name of the project containing the metrics:
131
114
  # "projects/[PROJECT_ID]"
132
- # "organizations/[ORGANIZATION_ID]"
133
- # "billingAccounts/[BILLING_ACCOUNT_ID]"
134
- # "folders/[FOLDER_ID]"
115
+ # @param [Fixnum] page_size
116
+ # Optional. The maximum number of results to return from this request. Non-
117
+ # positive values are ignored. The presence of nextPageToken in the response
118
+ # indicates that more results might be available.
135
119
  # @param [String] page_token
136
120
  # Optional. If present, then retrieve the next batch of results from the
137
121
  # preceding call to this method. pageToken must be the value of nextPageToken
138
122
  # from the previous response. The values of other method parameters should be
139
123
  # identical to those in the previous call.
140
- # @param [Fixnum] page_size
141
- # Optional. The maximum number of results to return from this request. Non-
142
- # positive values are ignored. The presence of nextPageToken in the response
143
- # indicates that more results might be available.
124
+ # @param [String] fields
125
+ # Selector specifying which fields to include in a partial response.
144
126
  # @param [String] quota_user
145
127
  # Available to use for quota purposes for server-side applications. Can be any
146
128
  # arbitrary string assigned to a user, but should not exceed 40 characters.
147
- # @param [String] fields
148
- # Selector specifying which fields to include in a partial response.
149
129
  # @param [Google::Apis::RequestOptions] options
150
130
  # Request-specific options
151
131
  #
152
132
  # @yield [result, err] Result & error if block supplied
153
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
133
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
154
134
  # @yieldparam err [StandardError] error object if request failed
155
135
  #
156
- # @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
136
+ # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
157
137
  #
158
138
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
159
139
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
160
140
  # @raise [Google::Apis::AuthorizationError] Authorization is required
161
- def list_organization_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
162
- command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
163
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
164
- command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
141
+ def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
142
+ command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options)
143
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
144
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
165
145
  command.params['parent'] = parent unless parent.nil?
166
- command.query['pageToken'] = page_token unless page_token.nil?
167
146
  command.query['pageSize'] = page_size unless page_size.nil?
168
- command.query['quotaUser'] = quota_user unless quota_user.nil?
147
+ command.query['pageToken'] = page_token unless page_token.nil?
169
148
  command.query['fields'] = fields unless fields.nil?
149
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
170
150
  execute_or_queue_command(command, &block)
171
151
  end
172
152
 
173
- # Lists log entries. Use this method to retrieve log entries from Stackdriver
174
- # Logging. For ways to export log entries, see Exporting Logs.
175
- # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
153
+ # Gets a logs-based metric.
154
+ # @param [String] metric_name
155
+ # The resource name of the desired metric:
156
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
157
+ # @param [String] fields
158
+ # Selector specifying which fields to include in a partial response.
176
159
  # @param [String] quota_user
177
160
  # Available to use for quota purposes for server-side applications. Can be any
178
161
  # arbitrary string assigned to a user, but should not exceed 40 characters.
162
+ # @param [Google::Apis::RequestOptions] options
163
+ # Request-specific options
164
+ #
165
+ # @yield [result, err] Result & error if block supplied
166
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
167
+ # @yieldparam err [StandardError] error object if request failed
168
+ #
169
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
170
+ #
171
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
172
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
173
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
174
+ def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
175
+ command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
176
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
177
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
178
+ command.params['metricName'] = metric_name unless metric_name.nil?
179
+ command.query['fields'] = fields unless fields.nil?
180
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
181
+ execute_or_queue_command(command, &block)
182
+ end
183
+
184
+ # Creates or updates a logs-based metric.
185
+ # @param [String] metric_name
186
+ # The resource name of the metric to update:
187
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
188
+ # The updated metric must be provided in the request and it's name field must be
189
+ # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
190
+ # new metric is created.
191
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
179
192
  # @param [String] fields
180
193
  # Selector specifying which fields to include in a partial response.
194
+ # @param [String] quota_user
195
+ # Available to use for quota purposes for server-side applications. Can be any
196
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
181
197
  # @param [Google::Apis::RequestOptions] options
182
198
  # Request-specific options
183
199
  #
184
200
  # @yield [result, err] Result & error if block supplied
185
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
201
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
186
202
  # @yieldparam err [StandardError] error object if request failed
187
203
  #
188
- # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
204
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
189
205
  #
190
206
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
191
207
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
192
208
  # @raise [Google::Apis::AuthorizationError] Authorization is required
193
- def list_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
194
- command = make_simple_command(:post, 'v2beta1/entries:list', options)
195
- command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
196
- command.request_object = list_log_entries_request_object
197
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
198
- command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
199
- command.query['quotaUser'] = quota_user unless quota_user.nil?
209
+ def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
210
+ command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
211
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
212
+ command.request_object = log_metric_object
213
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
214
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
215
+ command.params['metricName'] = metric_name unless metric_name.nil?
200
216
  command.query['fields'] = fields unless fields.nil?
217
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
201
218
  execute_or_queue_command(command, &block)
202
219
  end
203
220
 
204
- # Writes log entries to Stackdriver Logging.
205
- # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object
221
+ # Creates a logs-based metric.
222
+ # @param [String] parent
223
+ # The resource name of the project in which to create the metric:
224
+ # "projects/[PROJECT_ID]"
225
+ # The new metric must be provided in the request.
226
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
227
+ # @param [String] fields
228
+ # Selector specifying which fields to include in a partial response.
206
229
  # @param [String] quota_user
207
230
  # Available to use for quota purposes for server-side applications. Can be any
208
231
  # arbitrary string assigned to a user, but should not exceed 40 characters.
232
+ # @param [Google::Apis::RequestOptions] options
233
+ # Request-specific options
234
+ #
235
+ # @yield [result, err] Result & error if block supplied
236
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
237
+ # @yieldparam err [StandardError] error object if request failed
238
+ #
239
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
240
+ #
241
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
242
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
243
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
244
+ def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
245
+ command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options)
246
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
247
+ command.request_object = log_metric_object
248
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
249
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
250
+ command.params['parent'] = parent unless parent.nil?
251
+ command.query['fields'] = fields unless fields.nil?
252
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
253
+ execute_or_queue_command(command, &block)
254
+ end
255
+
256
+ # Deletes a logs-based metric.
257
+ # @param [String] metric_name
258
+ # The resource name of the metric to delete:
259
+ # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
209
260
  # @param [String] fields
210
261
  # Selector specifying which fields to include in a partial response.
262
+ # @param [String] quota_user
263
+ # Available to use for quota purposes for server-side applications. Can be any
264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
211
265
  # @param [Google::Apis::RequestOptions] options
212
266
  # Request-specific options
213
267
  #
214
268
  # @yield [result, err] Result & error if block supplied
215
- # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object
269
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
216
270
  # @yieldparam err [StandardError] error object if request failed
217
271
  #
218
- # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse]
272
+ # @return [Google::Apis::LoggingV2beta1::Empty]
219
273
  #
220
274
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
221
275
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
222
276
  # @raise [Google::Apis::AuthorizationError] Authorization is required
223
- def write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
224
- command = make_simple_command(:post, 'v2beta1/entries:write', options)
225
- command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation
226
- command.request_object = write_log_entries_request_object
227
- command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation
228
- command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse
229
- command.query['quotaUser'] = quota_user unless quota_user.nil?
277
+ def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
278
+ command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
279
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
280
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
281
+ command.params['metricName'] = metric_name unless metric_name.nil?
230
282
  command.query['fields'] = fields unless fields.nil?
283
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
231
284
  execute_or_queue_command(command, &block)
232
285
  end
233
286
 
@@ -243,11 +296,11 @@ module Google
243
296
  # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
244
297
  # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
245
298
  # 2Factivity". For more information about log names, see LogEntry.
299
+ # @param [String] fields
300
+ # Selector specifying which fields to include in a partial response.
246
301
  # @param [String] quota_user
247
302
  # Available to use for quota purposes for server-side applications. Can be any
248
303
  # arbitrary string assigned to a user, but should not exceed 40 characters.
249
- # @param [String] fields
250
- # Selector specifying which fields to include in a partial response.
251
304
  # @param [Google::Apis::RequestOptions] options
252
305
  # Request-specific options
253
306
  #
@@ -260,13 +313,13 @@ module Google
260
313
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
314
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
315
  # @raise [Google::Apis::AuthorizationError] Authorization is required
263
- def delete_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
316
+ def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
264
317
  command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
265
318
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
266
319
  command.response_class = Google::Apis::LoggingV2beta1::Empty
267
320
  command.params['logName'] = log_name unless log_name.nil?
268
- command.query['quotaUser'] = quota_user unless quota_user.nil?
269
321
  command.query['fields'] = fields unless fields.nil?
322
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
270
323
  execute_or_queue_command(command, &block)
271
324
  end
272
325
 
@@ -287,11 +340,11 @@ module Google
287
340
  # Optional. The maximum number of results to return from this request. Non-
288
341
  # positive values are ignored. The presence of nextPageToken in the response
289
342
  # indicates that more results might be available.
343
+ # @param [String] fields
344
+ # Selector specifying which fields to include in a partial response.
290
345
  # @param [String] quota_user
291
346
  # Available to use for quota purposes for server-side applications. Can be any
292
347
  # arbitrary string assigned to a user, but should not exceed 40 characters.
293
- # @param [String] fields
294
- # Selector specifying which fields to include in a partial response.
295
348
  # @param [Google::Apis::RequestOptions] options
296
349
  # Request-specific options
297
350
  #
@@ -304,52 +357,15 @@ module Google
304
357
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
305
358
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
306
359
  # @raise [Google::Apis::AuthorizationError] Authorization is required
307
- def list_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
360
+ def list_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
308
361
  command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
309
362
  command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
310
363
  command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
311
364
  command.params['parent'] = parent unless parent.nil?
312
365
  command.query['pageToken'] = page_token unless page_token.nil?
313
366
  command.query['pageSize'] = page_size unless page_size.nil?
314
- command.query['quotaUser'] = quota_user unless quota_user.nil?
315
367
  command.query['fields'] = fields unless fields.nil?
316
- execute_or_queue_command(command, &block)
317
- end
318
-
319
- # Deletes a sink. If the sink has a unique writer_identity, then that service
320
- # account is also deleted.
321
- # @param [String] sink_name
322
- # Required. The full resource name of the sink to delete, including the parent
323
- # resource and the sink identifier:
324
- # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
325
- # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
326
- # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
327
- # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
328
- # Example: "projects/my-project-id/sinks/my-sink-id".
329
- # @param [String] quota_user
330
- # Available to use for quota purposes for server-side applications. Can be any
331
- # arbitrary string assigned to a user, but should not exceed 40 characters.
332
- # @param [String] fields
333
- # Selector specifying which fields to include in a partial response.
334
- # @param [Google::Apis::RequestOptions] options
335
- # Request-specific options
336
- #
337
- # @yield [result, err] Result & error if block supplied
338
- # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
339
- # @yieldparam err [StandardError] error object if request failed
340
- #
341
- # @return [Google::Apis::LoggingV2beta1::Empty]
342
- #
343
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
344
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
345
- # @raise [Google::Apis::AuthorizationError] Authorization is required
346
- def delete_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
347
- command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
348
- command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
349
- command.response_class = Google::Apis::LoggingV2beta1::Empty
350
- command.params['sinkName'] = sink_name unless sink_name.nil?
351
368
  command.query['quotaUser'] = quota_user unless quota_user.nil?
352
- command.query['fields'] = fields unless fields.nil?
353
369
  execute_or_queue_command(command, &block)
354
370
  end
355
371
 
@@ -369,11 +385,11 @@ module Google
369
385
  # Optional. The maximum number of results to return from this request. Non-
370
386
  # positive values are ignored. The presence of nextPageToken in the response
371
387
  # indicates that more results might be available.
388
+ # @param [String] fields
389
+ # Selector specifying which fields to include in a partial response.
372
390
  # @param [String] quota_user
373
391
  # Available to use for quota purposes for server-side applications. Can be any
374
392
  # arbitrary string assigned to a user, but should not exceed 40 characters.
375
- # @param [String] fields
376
- # Selector specifying which fields to include in a partial response.
377
393
  # @param [Google::Apis::RequestOptions] options
378
394
  # Request-specific options
379
395
  #
@@ -386,15 +402,15 @@ module Google
386
402
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
387
403
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
388
404
  # @raise [Google::Apis::AuthorizationError] Authorization is required
389
- def list_project_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
405
+ def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
390
406
  command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options)
391
407
  command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
392
408
  command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
393
409
  command.params['parent'] = parent unless parent.nil?
394
410
  command.query['pageToken'] = page_token unless page_token.nil?
395
411
  command.query['pageSize'] = page_size unless page_size.nil?
396
- command.query['quotaUser'] = quota_user unless quota_user.nil?
397
412
  command.query['fields'] = fields unless fields.nil?
413
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
398
414
  execute_or_queue_command(command, &block)
399
415
  end
400
416
 
@@ -406,11 +422,11 @@ module Google
406
422
  # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
407
423
  # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
408
424
  # Example: "projects/my-project-id/sinks/my-sink-id".
425
+ # @param [String] fields
426
+ # Selector specifying which fields to include in a partial response.
409
427
  # @param [String] quota_user
410
428
  # Available to use for quota purposes for server-side applications. Can be any
411
429
  # arbitrary string assigned to a user, but should not exceed 40 characters.
412
- # @param [String] fields
413
- # Selector specifying which fields to include in a partial response.
414
430
  # @param [Google::Apis::RequestOptions] options
415
431
  # Request-specific options
416
432
  #
@@ -423,13 +439,13 @@ module Google
423
439
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
424
440
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
425
441
  # @raise [Google::Apis::AuthorizationError] Authorization is required
426
- def get_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
442
+ def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
427
443
  command = make_simple_command(:get, 'v2beta1/{+sinkName}', options)
428
444
  command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
429
445
  command.response_class = Google::Apis::LoggingV2beta1::LogSink
430
446
  command.params['sinkName'] = sink_name unless sink_name.nil?
431
- command.query['quotaUser'] = quota_user unless quota_user.nil?
432
447
  command.query['fields'] = fields unless fields.nil?
448
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
433
449
  execute_or_queue_command(command, &block)
434
450
  end
435
451
 
@@ -457,11 +473,11 @@ module Google
457
473
  # If the old value is false and the new value is true, then writer_identity is
458
474
  # changed to a unique service account.
459
475
  # It is an error if the old value is true and the new value is false.
476
+ # @param [String] fields
477
+ # Selector specifying which fields to include in a partial response.
460
478
  # @param [String] quota_user
461
479
  # Available to use for quota purposes for server-side applications. Can be any
462
480
  # arbitrary string assigned to a user, but should not exceed 40 characters.
463
- # @param [String] fields
464
- # Selector specifying which fields to include in a partial response.
465
481
  # @param [Google::Apis::RequestOptions] options
466
482
  # Request-specific options
467
483
  #
@@ -474,7 +490,7 @@ module Google
474
490
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
475
491
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
476
492
  # @raise [Google::Apis::AuthorizationError] Authorization is required
477
- def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
493
+ def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
478
494
  command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
479
495
  command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
480
496
  command.request_object = log_sink_object
@@ -482,8 +498,8 @@ module Google
482
498
  command.response_class = Google::Apis::LoggingV2beta1::LogSink
483
499
  command.params['sinkName'] = sink_name unless sink_name.nil?
484
500
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
485
- command.query['quotaUser'] = quota_user unless quota_user.nil?
486
501
  command.query['fields'] = fields unless fields.nil?
502
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
487
503
  execute_or_queue_command(command, &block)
488
504
  end
489
505
 
@@ -510,11 +526,11 @@ module Google
510
526
  # owned by a non-project resource such as an organization, then the value of
511
527
  # writer_identity will be a unique service account used only for exports from
512
528
  # the new sink. For more information, see writer_identity in LogSink.
529
+ # @param [String] fields
530
+ # Selector specifying which fields to include in a partial response.
513
531
  # @param [String] quota_user
514
532
  # Available to use for quota purposes for server-side applications. Can be any
515
533
  # arbitrary string assigned to a user, but should not exceed 40 characters.
516
- # @param [String] fields
517
- # Selector specifying which fields to include in a partial response.
518
534
  # @param [Google::Apis::RequestOptions] options
519
535
  # Request-specific options
520
536
  #
@@ -527,7 +543,7 @@ module Google
527
543
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
528
544
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
529
545
  # @raise [Google::Apis::AuthorizationError] Authorization is required
530
- def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
546
+ def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block)
531
547
  command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options)
532
548
  command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
533
549
  command.request_object = log_sink_object
@@ -535,92 +551,111 @@ module Google
535
551
  command.response_class = Google::Apis::LoggingV2beta1::LogSink
536
552
  command.params['parent'] = parent unless parent.nil?
537
553
  command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
538
- command.query['quotaUser'] = quota_user unless quota_user.nil?
539
554
  command.query['fields'] = fields unless fields.nil?
555
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
540
556
  execute_or_queue_command(command, &block)
541
557
  end
542
558
 
543
- # Creates or updates a logs-based metric.
544
- # @param [String] metric_name
545
- # The resource name of the metric to update:
546
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
547
- # The updated metric must be provided in the request and it's name field must be
548
- # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a
549
- # new metric is created.
550
- # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
559
+ # Deletes a sink. If the sink has a unique writer_identity, then that service
560
+ # account is also deleted.
561
+ # @param [String] sink_name
562
+ # Required. The full resource name of the sink to delete, including the parent
563
+ # resource and the sink identifier:
564
+ # "projects/[PROJECT_ID]/sinks/[SINK_ID]"
565
+ # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
566
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
567
+ # "folders/[FOLDER_ID]/sinks/[SINK_ID]"
568
+ # Example: "projects/my-project-id/sinks/my-sink-id".
569
+ # @param [String] fields
570
+ # Selector specifying which fields to include in a partial response.
551
571
  # @param [String] quota_user
552
572
  # Available to use for quota purposes for server-side applications. Can be any
553
573
  # arbitrary string assigned to a user, but should not exceed 40 characters.
554
- # @param [String] fields
555
- # Selector specifying which fields to include in a partial response.
556
574
  # @param [Google::Apis::RequestOptions] options
557
575
  # Request-specific options
558
576
  #
559
577
  # @yield [result, err] Result & error if block supplied
560
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
578
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
561
579
  # @yieldparam err [StandardError] error object if request failed
562
580
  #
563
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
581
+ # @return [Google::Apis::LoggingV2beta1::Empty]
564
582
  #
565
583
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
566
584
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
567
585
  # @raise [Google::Apis::AuthorizationError] Authorization is required
568
- def update_project_metric(metric_name, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block)
569
- command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
570
- command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
571
- command.request_object = log_metric_object
572
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
573
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
574
- command.params['metricName'] = metric_name unless metric_name.nil?
575
- command.query['quotaUser'] = quota_user unless quota_user.nil?
586
+ def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
587
+ command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
588
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
589
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
590
+ command.params['sinkName'] = sink_name unless sink_name.nil?
576
591
  command.query['fields'] = fields unless fields.nil?
592
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
577
593
  execute_or_queue_command(command, &block)
578
594
  end
579
595
 
580
- # Creates a logs-based metric.
596
+ # Lists the logs in projects, organizations, folders, or billing accounts. Only
597
+ # logs that have entries are listed.
581
598
  # @param [String] parent
582
- # The resource name of the project in which to create the metric:
599
+ # Required. The resource name that owns the logs:
583
600
  # "projects/[PROJECT_ID]"
584
- # The new metric must be provided in the request.
585
- # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
601
+ # "organizations/[ORGANIZATION_ID]"
602
+ # "billingAccounts/[BILLING_ACCOUNT_ID]"
603
+ # "folders/[FOLDER_ID]"
604
+ # @param [String] page_token
605
+ # Optional. If present, then retrieve the next batch of results from the
606
+ # preceding call to this method. pageToken must be the value of nextPageToken
607
+ # from the previous response. The values of other method parameters should be
608
+ # identical to those in the previous call.
609
+ # @param [Fixnum] page_size
610
+ # Optional. The maximum number of results to return from this request. Non-
611
+ # positive values are ignored. The presence of nextPageToken in the response
612
+ # indicates that more results might be available.
613
+ # @param [String] fields
614
+ # Selector specifying which fields to include in a partial response.
586
615
  # @param [String] quota_user
587
616
  # Available to use for quota purposes for server-side applications. Can be any
588
617
  # arbitrary string assigned to a user, but should not exceed 40 characters.
589
- # @param [String] fields
590
- # Selector specifying which fields to include in a partial response.
591
618
  # @param [Google::Apis::RequestOptions] options
592
619
  # Request-specific options
593
620
  #
594
621
  # @yield [result, err] Result & error if block supplied
595
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
622
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object
596
623
  # @yieldparam err [StandardError] error object if request failed
597
624
  #
598
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
625
+ # @return [Google::Apis::LoggingV2beta1::ListLogsResponse]
599
626
  #
600
627
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
601
628
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
602
629
  # @raise [Google::Apis::AuthorizationError] Authorization is required
603
- def create_project_metric(parent, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block)
604
- command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options)
605
- command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
606
- command.request_object = log_metric_object
607
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
608
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
630
+ def list_billing_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
631
+ command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
632
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
633
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
609
634
  command.params['parent'] = parent unless parent.nil?
610
- command.query['quotaUser'] = quota_user unless quota_user.nil?
635
+ command.query['pageToken'] = page_token unless page_token.nil?
636
+ command.query['pageSize'] = page_size unless page_size.nil?
611
637
  command.query['fields'] = fields unless fields.nil?
638
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
612
639
  execute_or_queue_command(command, &block)
613
640
  end
614
641
 
615
- # Deletes a logs-based metric.
616
- # @param [String] metric_name
617
- # The resource name of the metric to delete:
618
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
642
+ # Deletes all the log entries in a log. The log reappears if it receives new
643
+ # entries. Log entries written shortly before the delete operation might not be
644
+ # deleted.
645
+ # @param [String] log_name
646
+ # Required. The resource name of the log to delete:
647
+ # "projects/[PROJECT_ID]/logs/[LOG_ID]"
648
+ # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
649
+ # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]"
650
+ # "folders/[FOLDER_ID]/logs/[LOG_ID]"
651
+ # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
652
+ # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
653
+ # 2Factivity". For more information about log names, see LogEntry.
654
+ # @param [String] fields
655
+ # Selector specifying which fields to include in a partial response.
619
656
  # @param [String] quota_user
620
657
  # Available to use for quota purposes for server-side applications. Can be any
621
658
  # arbitrary string assigned to a user, but should not exceed 40 characters.
622
- # @param [String] fields
623
- # Selector specifying which fields to include in a partial response.
624
659
  # @param [Google::Apis::RequestOptions] options
625
660
  # Request-specific options
626
661
  #
@@ -633,20 +668,17 @@ module Google
633
668
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
634
669
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
635
670
  # @raise [Google::Apis::AuthorizationError] Authorization is required
636
- def delete_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
637
- command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
671
+ def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
672
+ command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
638
673
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
639
674
  command.response_class = Google::Apis::LoggingV2beta1::Empty
640
- command.params['metricName'] = metric_name unless metric_name.nil?
641
- command.query['quotaUser'] = quota_user unless quota_user.nil?
675
+ command.params['logName'] = log_name unless log_name.nil?
642
676
  command.query['fields'] = fields unless fields.nil?
677
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
643
678
  execute_or_queue_command(command, &block)
644
679
  end
645
680
 
646
- # Lists logs-based metrics.
647
- # @param [String] parent
648
- # Required. The name of the project containing the metrics:
649
- # "projects/[PROJECT_ID]"
681
+ # Lists the descriptors for monitored resource types used by Stackdriver Logging.
650
682
  # @param [String] page_token
651
683
  # Optional. If present, then retrieve the next batch of results from the
652
684
  # preceding call to this method. pageToken must be the value of nextPageToken
@@ -656,63 +688,31 @@ module Google
656
688
  # Optional. The maximum number of results to return from this request. Non-
657
689
  # positive values are ignored. The presence of nextPageToken in the response
658
690
  # indicates that more results might be available.
691
+ # @param [String] fields
692
+ # Selector specifying which fields to include in a partial response.
659
693
  # @param [String] quota_user
660
694
  # Available to use for quota purposes for server-side applications. Can be any
661
695
  # arbitrary string assigned to a user, but should not exceed 40 characters.
662
- # @param [String] fields
663
- # Selector specifying which fields to include in a partial response.
664
696
  # @param [Google::Apis::RequestOptions] options
665
697
  # Request-specific options
666
698
  #
667
699
  # @yield [result, err] Result & error if block supplied
668
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
700
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object
669
701
  # @yieldparam err [StandardError] error object if request failed
670
702
  #
671
- # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
703
+ # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse]
672
704
  #
673
705
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
674
706
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
675
707
  # @raise [Google::Apis::AuthorizationError] Authorization is required
676
- def list_project_metrics(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
677
- command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options)
678
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
679
- command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
680
- command.params['parent'] = parent unless parent.nil?
708
+ def list_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
709
+ command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options)
710
+ command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation
711
+ command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse
681
712
  command.query['pageToken'] = page_token unless page_token.nil?
682
713
  command.query['pageSize'] = page_size unless page_size.nil?
683
- command.query['quotaUser'] = quota_user unless quota_user.nil?
684
714
  command.query['fields'] = fields unless fields.nil?
685
- execute_or_queue_command(command, &block)
686
- end
687
-
688
- # Gets a logs-based metric.
689
- # @param [String] metric_name
690
- # The resource name of the desired metric:
691
- # "projects/[PROJECT_ID]/metrics/[METRIC_ID]"
692
- # @param [String] quota_user
693
- # Available to use for quota purposes for server-side applications. Can be any
694
- # arbitrary string assigned to a user, but should not exceed 40 characters.
695
- # @param [String] fields
696
- # Selector specifying which fields to include in a partial response.
697
- # @param [Google::Apis::RequestOptions] options
698
- # Request-specific options
699
- #
700
- # @yield [result, err] Result & error if block supplied
701
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
702
- # @yieldparam err [StandardError] error object if request failed
703
- #
704
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
705
- #
706
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
707
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
708
- # @raise [Google::Apis::AuthorizationError] Authorization is required
709
- def get_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
710
- command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
711
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
712
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
713
- command.params['metricName'] = metric_name unless metric_name.nil?
714
715
  command.query['quotaUser'] = quota_user unless quota_user.nil?
715
- command.query['fields'] = fields unless fields.nil?
716
716
  execute_or_queue_command(command, &block)
717
717
  end
718
718
 
@@ -728,11 +728,11 @@ module Google
728
728
  # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog"
729
729
  # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com%
730
730
  # 2Factivity". For more information about log names, see LogEntry.
731
+ # @param [String] fields
732
+ # Selector specifying which fields to include in a partial response.
731
733
  # @param [String] quota_user
732
734
  # Available to use for quota purposes for server-side applications. Can be any
733
735
  # arbitrary string assigned to a user, but should not exceed 40 characters.
734
- # @param [String] fields
735
- # Selector specifying which fields to include in a partial response.
736
736
  # @param [Google::Apis::RequestOptions] options
737
737
  # Request-specific options
738
738
  #
@@ -745,13 +745,13 @@ module Google
745
745
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
746
746
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
747
747
  # @raise [Google::Apis::AuthorizationError] Authorization is required
748
- def delete_billing_account_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
748
+ def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
749
749
  command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
750
750
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
751
751
  command.response_class = Google::Apis::LoggingV2beta1::Empty
752
752
  command.params['logName'] = log_name unless log_name.nil?
753
- command.query['quotaUser'] = quota_user unless quota_user.nil?
754
753
  command.query['fields'] = fields unless fields.nil?
754
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
755
755
  execute_or_queue_command(command, &block)
756
756
  end
757
757
 
@@ -772,11 +772,11 @@ module Google
772
772
  # Optional. The maximum number of results to return from this request. Non-
773
773
  # positive values are ignored. The presence of nextPageToken in the response
774
774
  # indicates that more results might be available.
775
+ # @param [String] fields
776
+ # Selector specifying which fields to include in a partial response.
775
777
  # @param [String] quota_user
776
778
  # Available to use for quota purposes for server-side applications. Can be any
777
779
  # arbitrary string assigned to a user, but should not exceed 40 characters.
778
- # @param [String] fields
779
- # Selector specifying which fields to include in a partial response.
780
780
  # @param [Google::Apis::RequestOptions] options
781
781
  # Request-specific options
782
782
  #
@@ -789,23 +789,23 @@ module Google
789
789
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
790
790
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
791
791
  # @raise [Google::Apis::AuthorizationError] Authorization is required
792
- def list_billing_account_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
792
+ def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
793
793
  command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options)
794
794
  command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation
795
795
  command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse
796
796
  command.params['parent'] = parent unless parent.nil?
797
797
  command.query['pageToken'] = page_token unless page_token.nil?
798
798
  command.query['pageSize'] = page_size unless page_size.nil?
799
- command.query['quotaUser'] = quota_user unless quota_user.nil?
800
799
  command.query['fields'] = fields unless fields.nil?
800
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
801
801
  execute_or_queue_command(command, &block)
802
802
  end
803
803
 
804
804
  protected
805
805
 
806
806
  def apply_command_defaults(command)
807
- command.query['quotaUser'] = quota_user unless quota_user.nil?
808
807
  command.query['key'] = key unless key.nil?
808
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
809
809
  end
810
810
  end
811
811
  end