google-api-client 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,337 @@
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
+ class Empty
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+ end
28
+
29
+ class WriteLogEntriesRequest
30
+ class Representation < Google::Apis::Core::JsonRepresentation; end
31
+ end
32
+
33
+ class MonitoredResource
34
+ class Representation < Google::Apis::Core::JsonRepresentation; end
35
+ end
36
+
37
+ class LogEntry
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+ end
40
+
41
+ class HttpRequest
42
+ class Representation < Google::Apis::Core::JsonRepresentation; end
43
+ end
44
+
45
+ class LogEntryOperation
46
+ class Representation < Google::Apis::Core::JsonRepresentation; end
47
+ end
48
+
49
+ class WriteLogEntriesResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+ end
52
+
53
+ class ListLogEntriesRequest
54
+ class Representation < Google::Apis::Core::JsonRepresentation; end
55
+ end
56
+
57
+ class ListLogEntriesResponse
58
+ class Representation < Google::Apis::Core::JsonRepresentation; end
59
+ end
60
+
61
+ class ListMonitoredResourceDescriptorsResponse
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+ end
64
+
65
+ class MonitoredResourceDescriptor
66
+ class Representation < Google::Apis::Core::JsonRepresentation; end
67
+ end
68
+
69
+ class LabelDescriptor
70
+ class Representation < Google::Apis::Core::JsonRepresentation; end
71
+ end
72
+
73
+ class ListSinksResponse
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+ end
76
+
77
+ class LogSink
78
+ class Representation < Google::Apis::Core::JsonRepresentation; end
79
+ end
80
+
81
+ class ListLogMetricsResponse
82
+ class Representation < Google::Apis::Core::JsonRepresentation; end
83
+ end
84
+
85
+ class LogMetric
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+ end
88
+
89
+ class RequestLog
90
+ class Representation < Google::Apis::Core::JsonRepresentation; end
91
+ end
92
+
93
+ class LogLine
94
+ class Representation < Google::Apis::Core::JsonRepresentation; end
95
+ end
96
+
97
+ class SourceLocation
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+ end
100
+
101
+ class SourceReference
102
+ class Representation < Google::Apis::Core::JsonRepresentation; end
103
+ end
104
+
105
+ class Empty
106
+ # @private
107
+ class Representation < Google::Apis::Core::JsonRepresentation
108
+ end
109
+ end
110
+
111
+ class WriteLogEntriesRequest
112
+ # @private
113
+ class Representation < Google::Apis::Core::JsonRepresentation
114
+ property :log_name, as: 'logName'
115
+ property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation
116
+
117
+ hash :labels, as: 'labels'
118
+ collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation
119
+
120
+ end
121
+ end
122
+
123
+ class MonitoredResource
124
+ # @private
125
+ class Representation < Google::Apis::Core::JsonRepresentation
126
+ property :type, as: 'type'
127
+ hash :labels, as: 'labels'
128
+ end
129
+ end
130
+
131
+ class LogEntry
132
+ # @private
133
+ class Representation < Google::Apis::Core::JsonRepresentation
134
+ property :log_name, as: 'logName'
135
+ property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation
136
+
137
+ hash :proto_payload, as: 'protoPayload'
138
+ property :text_payload, as: 'textPayload'
139
+ hash :json_payload, as: 'jsonPayload'
140
+ property :timestamp, as: 'timestamp'
141
+ property :severity, as: 'severity'
142
+ property :insert_id, as: 'insertId'
143
+ property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation
144
+
145
+ hash :labels, as: 'labels'
146
+ property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation
147
+
148
+ end
149
+ end
150
+
151
+ class HttpRequest
152
+ # @private
153
+ class Representation < Google::Apis::Core::JsonRepresentation
154
+ property :request_method, as: 'requestMethod'
155
+ property :request_url, as: 'requestUrl'
156
+ property :request_size, as: 'requestSize'
157
+ property :status, as: 'status'
158
+ property :response_size, as: 'responseSize'
159
+ property :user_agent, as: 'userAgent'
160
+ property :remote_ip, as: 'remoteIp'
161
+ property :referer, as: 'referer'
162
+ property :cache_hit, as: 'cacheHit'
163
+ property :validated_with_origin_server, as: 'validatedWithOriginServer'
164
+ end
165
+ end
166
+
167
+ class LogEntryOperation
168
+ # @private
169
+ class Representation < Google::Apis::Core::JsonRepresentation
170
+ property :id, as: 'id'
171
+ property :producer, as: 'producer'
172
+ property :first, as: 'first'
173
+ property :last, as: 'last'
174
+ end
175
+ end
176
+
177
+ class WriteLogEntriesResponse
178
+ # @private
179
+ class Representation < Google::Apis::Core::JsonRepresentation
180
+ end
181
+ end
182
+
183
+ class ListLogEntriesRequest
184
+ # @private
185
+ class Representation < Google::Apis::Core::JsonRepresentation
186
+ collection :project_ids, as: 'projectIds'
187
+ property :filter, as: 'filter'
188
+ property :order_by, as: 'orderBy'
189
+ property :page_size, as: 'pageSize'
190
+ property :page_token, as: 'pageToken'
191
+ end
192
+ end
193
+
194
+ class ListLogEntriesResponse
195
+ # @private
196
+ class Representation < Google::Apis::Core::JsonRepresentation
197
+ collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation
198
+
199
+ property :next_page_token, as: 'nextPageToken'
200
+ end
201
+ end
202
+
203
+ class ListMonitoredResourceDescriptorsResponse
204
+ # @private
205
+ class Representation < Google::Apis::Core::JsonRepresentation
206
+ collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation
207
+
208
+ property :next_page_token, as: 'nextPageToken'
209
+ end
210
+ end
211
+
212
+ class MonitoredResourceDescriptor
213
+ # @private
214
+ class Representation < Google::Apis::Core::JsonRepresentation
215
+ property :type, as: 'type'
216
+ property :display_name, as: 'displayName'
217
+ property :description, as: 'description'
218
+ collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation
219
+
220
+ end
221
+ end
222
+
223
+ class LabelDescriptor
224
+ # @private
225
+ class Representation < Google::Apis::Core::JsonRepresentation
226
+ property :key, as: 'key'
227
+ property :value_type, as: 'valueType'
228
+ property :description, as: 'description'
229
+ end
230
+ end
231
+
232
+ class ListSinksResponse
233
+ # @private
234
+ class Representation < Google::Apis::Core::JsonRepresentation
235
+ collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation
236
+
237
+ property :next_page_token, as: 'nextPageToken'
238
+ end
239
+ end
240
+
241
+ class LogSink
242
+ # @private
243
+ class Representation < Google::Apis::Core::JsonRepresentation
244
+ property :name, as: 'name'
245
+ property :destination, as: 'destination'
246
+ property :filter, as: 'filter'
247
+ property :output_version_format, as: 'outputVersionFormat'
248
+ end
249
+ end
250
+
251
+ class ListLogMetricsResponse
252
+ # @private
253
+ class Representation < Google::Apis::Core::JsonRepresentation
254
+ collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation
255
+
256
+ property :next_page_token, as: 'nextPageToken'
257
+ end
258
+ end
259
+
260
+ class LogMetric
261
+ # @private
262
+ class Representation < Google::Apis::Core::JsonRepresentation
263
+ property :name, as: 'name'
264
+ property :description, as: 'description'
265
+ property :filter, as: 'filter'
266
+ end
267
+ end
268
+
269
+ class RequestLog
270
+ # @private
271
+ class Representation < Google::Apis::Core::JsonRepresentation
272
+ property :app_id, as: 'appId'
273
+ property :module_id, as: 'moduleId'
274
+ property :version_id, as: 'versionId'
275
+ property :request_id, as: 'requestId'
276
+ property :ip, as: 'ip'
277
+ property :start_time, as: 'startTime'
278
+ property :end_time, as: 'endTime'
279
+ property :latency, as: 'latency'
280
+ property :mega_cycles, as: 'megaCycles'
281
+ property :method_prop, as: 'method'
282
+ property :resource, as: 'resource'
283
+ property :http_version, as: 'httpVersion'
284
+ property :status, as: 'status'
285
+ property :response_size, as: 'responseSize'
286
+ property :referrer, as: 'referrer'
287
+ property :user_agent, as: 'userAgent'
288
+ property :nickname, as: 'nickname'
289
+ property :url_map_entry, as: 'urlMapEntry'
290
+ property :host, as: 'host'
291
+ property :cost, as: 'cost'
292
+ property :task_queue_name, as: 'taskQueueName'
293
+ property :task_name, as: 'taskName'
294
+ property :was_loading_request, as: 'wasLoadingRequest'
295
+ property :pending_time, as: 'pendingTime'
296
+ property :instance_index, as: 'instanceIndex'
297
+ property :finished, as: 'finished'
298
+ property :instance_id, as: 'instanceId'
299
+ collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation
300
+
301
+ property :app_engine_release, as: 'appEngineRelease'
302
+ property :trace_id, as: 'traceId'
303
+ collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation
304
+
305
+ end
306
+ end
307
+
308
+ class LogLine
309
+ # @private
310
+ class Representation < Google::Apis::Core::JsonRepresentation
311
+ property :time, as: 'time'
312
+ property :severity, as: 'severity'
313
+ property :log_message, as: 'logMessage'
314
+ property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation
315
+
316
+ end
317
+ end
318
+
319
+ class SourceLocation
320
+ # @private
321
+ class Representation < Google::Apis::Core::JsonRepresentation
322
+ property :file, as: 'file'
323
+ property :line, as: 'line'
324
+ property :function_name, as: 'functionName'
325
+ end
326
+ end
327
+
328
+ class SourceReference
329
+ # @private
330
+ class Representation < Google::Apis::Core::JsonRepresentation
331
+ property :repository, as: 'repository'
332
+ property :revision_id, as: 'revisionId'
333
+ end
334
+ end
335
+ end
336
+ end
337
+ end
@@ -0,0 +1,547 @@
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/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module LoggingV2beta1
23
+ # Google Cloud Logging API
24
+ #
25
+ # The Google Cloud Logging API lets you write log entries and manage your logs,
26
+ # log sinks and logs-based metrics.
27
+ #
28
+ # @example
29
+ # require 'google/apis/logging_v2beta1'
30
+ #
31
+ # Logging = Google::Apis::LoggingV2beta1 # Alias the module
32
+ # service = Logging::LoggingService.new
33
+ #
34
+ # @see https://cloud.google.com/logging/docs/
35
+ class LoggingService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://logging.googleapis.com/', '')
48
+ end
49
+
50
+ # Deletes a log and all its log entries. The log will reappear if it receives
51
+ # new entries.
52
+ # @param [String] log_name
53
+ # Required. The resource name of the log to delete. Example: `"projects/my-
54
+ # project/logs/syslog"`.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::LoggingV2beta1::Empty]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
74
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
75
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
76
+ command.params['logName'] = log_name unless log_name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists sinks.
83
+ # @param [String] project_name
84
+ # Required. The resource name of the project containing the sinks. Example: `"
85
+ # projects/my-logging-project"`, `"projects/01234567890"`.
86
+ # @param [String] page_token
87
+ # Optional. If the `pageToken` request parameter is supplied, then the next page
88
+ # of results in the set are retrieved. The `pageToken` parameter must be set
89
+ # with the value of the `nextPageToken` result parameter from the previous
90
+ # request. The value of `projectName` must be the same as in the previous
91
+ # request.
92
+ # @param [Fixnum] page_size
93
+ # Optional. The maximum number of results to return from this request. Fewer
94
+ # results might be returned. You must check for the `nextPageToken` result to
95
+ # determine if additional results are available, which you can retrieve by
96
+ # passing the `nextPageToken` value in the `pageToken` parameter to the next
97
+ # request.
98
+ # @param [String] fields
99
+ # Selector specifying which fields to include in a partial response.
100
+ # @param [String] quota_user
101
+ # Available to use for quota purposes for server-side applications. Can be any
102
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
103
+ # @param [Google::Apis::RequestOptions] options
104
+ # Request-specific options
105
+ #
106
+ # @yield [result, err] Result & error if block supplied
107
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object
108
+ # @yieldparam err [StandardError] error object if request failed
109
+ #
110
+ # @return [Google::Apis::LoggingV2beta1::ListSinksResponse]
111
+ #
112
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
113
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
114
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
115
+ def list_project_sinks(project_name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
116
+ command = make_simple_command(:get, 'v2beta1/{+projectName}/sinks', options)
117
+ command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
118
+ command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
119
+ command.params['projectName'] = project_name unless project_name.nil?
120
+ command.query['pageToken'] = page_token unless page_token.nil?
121
+ command.query['pageSize'] = page_size unless page_size.nil?
122
+ command.query['fields'] = fields unless fields.nil?
123
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
124
+ execute_or_queue_command(command, &block)
125
+ end
126
+
127
+ # Gets a sink.
128
+ # @param [String] sink_name
129
+ # The resource name of the sink to return. Example: `"projects/my-project-id/
130
+ # sinks/my-sink-id"`.
131
+ # @param [String] fields
132
+ # Selector specifying which fields to include in a partial response.
133
+ # @param [String] quota_user
134
+ # Available to use for quota purposes for server-side applications. Can be any
135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
136
+ # @param [Google::Apis::RequestOptions] options
137
+ # Request-specific options
138
+ #
139
+ # @yield [result, err] Result & error if block supplied
140
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
141
+ # @yieldparam err [StandardError] error object if request failed
142
+ #
143
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
144
+ #
145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
148
+ def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
149
+ command = make_simple_command(:get, 'v2beta1/{+sinkName}', options)
150
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
151
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
152
+ command.params['sinkName'] = sink_name unless sink_name.nil?
153
+ command.query['fields'] = fields unless fields.nil?
154
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
155
+ execute_or_queue_command(command, &block)
156
+ end
157
+
158
+ # Creates a sink.
159
+ # @param [String] project_name
160
+ # The resource name of the project in which to create the sink. Example: `"
161
+ # projects/my-project-id"`. The new sink must be provided in the request.
162
+ # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
163
+ # @param [String] fields
164
+ # Selector specifying which fields to include in a partial response.
165
+ # @param [String] quota_user
166
+ # Available to use for quota purposes for server-side applications. Can be any
167
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
168
+ # @param [Google::Apis::RequestOptions] options
169
+ # Request-specific options
170
+ #
171
+ # @yield [result, err] Result & error if block supplied
172
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
173
+ # @yieldparam err [StandardError] error object if request failed
174
+ #
175
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
176
+ #
177
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
178
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
179
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
180
+ def create_project_sink(project_name, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
181
+ command = make_simple_command(:post, 'v2beta1/{+projectName}/sinks', options)
182
+ command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
183
+ command.request_object = log_sink_object
184
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
185
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
186
+ command.params['projectName'] = project_name unless project_name.nil?
187
+ command.query['fields'] = fields unless fields.nil?
188
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
189
+ execute_or_queue_command(command, &block)
190
+ end
191
+
192
+ # Creates or updates a sink.
193
+ # @param [String] sink_name
194
+ # The resource name of the sink to update. Example: `"projects/my-project-id/
195
+ # sinks/my-sink-id"`. The updated sink must be provided in the request and have
196
+ # the same name that is specified in `sinkName`. If the sink does not exist, it
197
+ # is created.
198
+ # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
199
+ # @param [String] fields
200
+ # Selector specifying which fields to include in a partial response.
201
+ # @param [String] quota_user
202
+ # Available to use for quota purposes for server-side applications. Can be any
203
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
204
+ # @param [Google::Apis::RequestOptions] options
205
+ # Request-specific options
206
+ #
207
+ # @yield [result, err] Result & error if block supplied
208
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
209
+ # @yieldparam err [StandardError] error object if request failed
210
+ #
211
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
212
+ #
213
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
214
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
215
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
216
+ def update_project_sink(sink_name, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
217
+ command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
218
+ command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
219
+ command.request_object = log_sink_object
220
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
221
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
222
+ command.params['sinkName'] = sink_name unless sink_name.nil?
223
+ command.query['fields'] = fields unless fields.nil?
224
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
225
+ execute_or_queue_command(command, &block)
226
+ end
227
+
228
+ # Deletes a sink.
229
+ # @param [String] sink_name
230
+ # The resource name of the sink to delete. Example: `"projects/my-project-id/
231
+ # sinks/my-sink-id"`.
232
+ # @param [String] fields
233
+ # Selector specifying which fields to include in a partial response.
234
+ # @param [String] quota_user
235
+ # Available to use for quota purposes for server-side applications. Can be any
236
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
237
+ # @param [Google::Apis::RequestOptions] options
238
+ # Request-specific options
239
+ #
240
+ # @yield [result, err] Result & error if block supplied
241
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
242
+ # @yieldparam err [StandardError] error object if request failed
243
+ #
244
+ # @return [Google::Apis::LoggingV2beta1::Empty]
245
+ #
246
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
247
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
248
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
249
+ def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
250
+ command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
251
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
252
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
253
+ command.params['sinkName'] = sink_name unless sink_name.nil?
254
+ command.query['fields'] = fields unless fields.nil?
255
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
256
+ execute_or_queue_command(command, &block)
257
+ end
258
+
259
+ # Lists logs-based metrics.
260
+ # @param [String] project_name
261
+ # Required. The resource name of the project containing the metrics. Example: `"
262
+ # projects/my-project-id"`.
263
+ # @param [String] page_token
264
+ # Optional. If the `pageToken` request parameter is supplied, then the next page
265
+ # of results in the set are retrieved. The `pageToken` parameter must be set
266
+ # with the value of the `nextPageToken` result parameter from the previous
267
+ # request. The value of `projectName` must be the same as in the previous
268
+ # request.
269
+ # @param [Fixnum] page_size
270
+ # Optional. The maximum number of results to return from this request. Fewer
271
+ # results might be returned. You must check for the `nextPageToken` result to
272
+ # determine if additional results are available, which you can retrieve by
273
+ # passing the `nextPageToken` value in the `pageToken` parameter to the next
274
+ # request.
275
+ # @param [String] fields
276
+ # Selector specifying which fields to include in a partial response.
277
+ # @param [String] quota_user
278
+ # Available to use for quota purposes for server-side applications. Can be any
279
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
280
+ # @param [Google::Apis::RequestOptions] options
281
+ # Request-specific options
282
+ #
283
+ # @yield [result, err] Result & error if block supplied
284
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
285
+ # @yieldparam err [StandardError] error object if request failed
286
+ #
287
+ # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
288
+ #
289
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
290
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
291
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
292
+ def list_project_metrics(project_name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
293
+ command = make_simple_command(:get, 'v2beta1/{+projectName}/metrics', options)
294
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
295
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
296
+ command.params['projectName'] = project_name unless project_name.nil?
297
+ command.query['pageToken'] = page_token unless page_token.nil?
298
+ command.query['pageSize'] = page_size unless page_size.nil?
299
+ command.query['fields'] = fields unless fields.nil?
300
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
301
+ execute_or_queue_command(command, &block)
302
+ end
303
+
304
+ # Gets a logs-based metric.
305
+ # @param [String] metric_name
306
+ # The resource name of the desired metric. Example: `"projects/my-project-id/
307
+ # metrics/my-metric-id"`.
308
+ # @param [String] fields
309
+ # Selector specifying which fields to include in a partial response.
310
+ # @param [String] quota_user
311
+ # Available to use for quota purposes for server-side applications. Can be any
312
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
313
+ # @param [Google::Apis::RequestOptions] options
314
+ # Request-specific options
315
+ #
316
+ # @yield [result, err] Result & error if block supplied
317
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
318
+ # @yieldparam err [StandardError] error object if request failed
319
+ #
320
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
321
+ #
322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
325
+ def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
326
+ command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
327
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
328
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
329
+ command.params['metricName'] = metric_name unless metric_name.nil?
330
+ command.query['fields'] = fields unless fields.nil?
331
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
332
+ execute_or_queue_command(command, &block)
333
+ end
334
+
335
+ # Creates a logs-based metric.
336
+ # @param [String] project_name
337
+ # The resource name of the project in which to create the metric. Example: `"
338
+ # projects/my-project-id"`. The new metric must be provided in the request.
339
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
340
+ # @param [String] fields
341
+ # Selector specifying which fields to include in a partial response.
342
+ # @param [String] quota_user
343
+ # Available to use for quota purposes for server-side applications. Can be any
344
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
345
+ # @param [Google::Apis::RequestOptions] options
346
+ # Request-specific options
347
+ #
348
+ # @yield [result, err] Result & error if block supplied
349
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
350
+ # @yieldparam err [StandardError] error object if request failed
351
+ #
352
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
353
+ #
354
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
355
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
356
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
357
+ def create_project_metric(project_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
358
+ command = make_simple_command(:post, 'v2beta1/{+projectName}/metrics', options)
359
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
360
+ command.request_object = log_metric_object
361
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
362
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
363
+ command.params['projectName'] = project_name unless project_name.nil?
364
+ command.query['fields'] = fields unless fields.nil?
365
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
366
+ execute_or_queue_command(command, &block)
367
+ end
368
+
369
+ # Creates or updates a logs-based metric.
370
+ # @param [String] metric_name
371
+ # The resource name of the metric to update. Example: `"projects/my-project-id/
372
+ # metrics/my-metric-id"`. The updated metric must be provided in the request and
373
+ # have the same identifier that is specified in `metricName`. If the metric does
374
+ # not exist, it is created.
375
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
376
+ # @param [String] fields
377
+ # Selector specifying which fields to include in a partial response.
378
+ # @param [String] quota_user
379
+ # Available to use for quota purposes for server-side applications. Can be any
380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
381
+ # @param [Google::Apis::RequestOptions] options
382
+ # Request-specific options
383
+ #
384
+ # @yield [result, err] Result & error if block supplied
385
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
386
+ # @yieldparam err [StandardError] error object if request failed
387
+ #
388
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
389
+ #
390
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
391
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
392
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
393
+ def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
394
+ command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
395
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
396
+ command.request_object = log_metric_object
397
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
398
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
399
+ command.params['metricName'] = metric_name unless metric_name.nil?
400
+ command.query['fields'] = fields unless fields.nil?
401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
402
+ execute_or_queue_command(command, &block)
403
+ end
404
+
405
+ # Deletes a logs-based metric.
406
+ # @param [String] metric_name
407
+ # The resource name of the metric to delete. Example: `"projects/my-project-id/
408
+ # metrics/my-metric-id"`.
409
+ # @param [String] fields
410
+ # Selector specifying which fields to include in a partial response.
411
+ # @param [String] quota_user
412
+ # Available to use for quota purposes for server-side applications. Can be any
413
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
414
+ # @param [Google::Apis::RequestOptions] options
415
+ # Request-specific options
416
+ #
417
+ # @yield [result, err] Result & error if block supplied
418
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
419
+ # @yieldparam err [StandardError] error object if request failed
420
+ #
421
+ # @return [Google::Apis::LoggingV2beta1::Empty]
422
+ #
423
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
424
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
425
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
426
+ def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
427
+ command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
428
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
429
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
430
+ command.params['metricName'] = metric_name unless metric_name.nil?
431
+ command.query['fields'] = fields unless fields.nil?
432
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
433
+ execute_or_queue_command(command, &block)
434
+ end
435
+
436
+ # Writes log entries to Cloud Logging. All log entries in Cloud Logging are
437
+ # written by this method.
438
+ # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object
439
+ # @param [String] fields
440
+ # Selector specifying which fields to include in a partial response.
441
+ # @param [String] quota_user
442
+ # Available to use for quota purposes for server-side applications. Can be any
443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
444
+ # @param [Google::Apis::RequestOptions] options
445
+ # Request-specific options
446
+ #
447
+ # @yield [result, err] Result & error if block supplied
448
+ # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object
449
+ # @yieldparam err [StandardError] error object if request failed
450
+ #
451
+ # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse]
452
+ #
453
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
454
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
455
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
456
+ def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
457
+ command = make_simple_command(:post, 'v2beta1/entries:write', options)
458
+ command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation
459
+ command.request_object = write_log_entries_request_object
460
+ command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation
461
+ command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse
462
+ command.query['fields'] = fields unless fields.nil?
463
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
464
+ execute_or_queue_command(command, &block)
465
+ end
466
+
467
+ # Lists log entries. Use this method to retrieve log entries from Cloud Logging.
468
+ # For ways to export log entries, see [Exporting Logs](/logging/docs/export).
469
+ # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
470
+ # @param [String] fields
471
+ # Selector specifying which fields to include in a partial response.
472
+ # @param [String] quota_user
473
+ # Available to use for quota purposes for server-side applications. Can be any
474
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
475
+ # @param [Google::Apis::RequestOptions] options
476
+ # Request-specific options
477
+ #
478
+ # @yield [result, err] Result & error if block supplied
479
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object
480
+ # @yieldparam err [StandardError] error object if request failed
481
+ #
482
+ # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse]
483
+ #
484
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
485
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
486
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
487
+ def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
488
+ command = make_simple_command(:post, 'v2beta1/entries:list', options)
489
+ command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
490
+ command.request_object = list_log_entries_request_object
491
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
492
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
493
+ command.query['fields'] = fields unless fields.nil?
494
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
495
+ execute_or_queue_command(command, &block)
496
+ end
497
+
498
+ # Lists monitored resource descriptors that are used by Cloud Logging.
499
+ # @param [Fixnum] page_size
500
+ # Optional. The maximum number of results to return from this request. Fewer
501
+ # results might be returned. You must check for the `nextPageToken` result to
502
+ # determine if additional results are available, which you can retrieve by
503
+ # passing the `nextPageToken` value in the `pageToken` parameter to the next
504
+ # request.
505
+ # @param [String] page_token
506
+ # Optional. If the `pageToken` request parameter is supplied, then the next page
507
+ # of results in the set are retrieved. The `pageToken` parameter must be set
508
+ # with the value of the `nextPageToken` result parameter from the previous
509
+ # request.
510
+ # @param [String] fields
511
+ # Selector specifying which fields to include in a partial response.
512
+ # @param [String] quota_user
513
+ # Available to use for quota purposes for server-side applications. Can be any
514
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
515
+ # @param [Google::Apis::RequestOptions] options
516
+ # Request-specific options
517
+ #
518
+ # @yield [result, err] Result & error if block supplied
519
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object
520
+ # @yieldparam err [StandardError] error object if request failed
521
+ #
522
+ # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse]
523
+ #
524
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
525
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
526
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
527
+ def list_monitored_resource_descriptors(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
528
+ command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options)
529
+ command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation
530
+ command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse
531
+ command.query['pageSize'] = page_size unless page_size.nil?
532
+ command.query['pageToken'] = page_token unless page_token.nil?
533
+ command.query['fields'] = fields unless fields.nil?
534
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
535
+ execute_or_queue_command(command, &block)
536
+ end
537
+
538
+ protected
539
+
540
+ def apply_command_defaults(command)
541
+ command.query['key'] = key unless key.nil?
542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
543
+ end
544
+ end
545
+ end
546
+ end
547
+ end