google-api-client 0.9.8 → 0.9.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/Gemfile +9 -1
  4. data/README.md +10 -2
  5. data/api_names.yaml +63 -110
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  11. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
  12. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
  13. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  14. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  15. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  16. data/generated/google/apis/admin_directory_v1.rb +1 -1
  17. data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
  18. data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
  19. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  20. data/generated/google/apis/admin_reports_v1.rb +3 -3
  21. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  22. data/generated/google/apis/adsense_v1_4.rb +1 -1
  23. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  24. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  26. data/generated/google/apis/analytics_v3.rb +1 -1
  27. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  28. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  29. data/generated/google/apis/analytics_v3/service.rb +217 -0
  30. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  31. data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
  32. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  33. data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
  34. data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
  35. data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
  36. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  37. data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
  38. data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
  39. data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
  40. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  41. data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
  42. data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
  43. data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
  44. data/generated/google/apis/appsactivity_v1.rb +1 -1
  45. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  46. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  47. data/generated/google/apis/appstate_v1.rb +1 -1
  48. data/generated/google/apis/bigquery_v2.rb +1 -1
  49. data/generated/google/apis/bigquery_v2/classes.rb +277 -20
  50. data/generated/google/apis/bigquery_v2/representations.rb +86 -0
  51. data/generated/google/apis/bigquery_v2/service.rb +8 -2
  52. data/generated/google/apis/books_v1.rb +2 -2
  53. data/generated/google/apis/books_v1/classes.rb +79 -1
  54. data/generated/google/apis/books_v1/representations.rb +34 -0
  55. data/generated/google/apis/books_v1/service.rb +7 -3
  56. data/generated/google/apis/calendar_v3.rb +1 -1
  57. data/generated/google/apis/civicinfo_v2.rb +3 -2
  58. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  59. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  60. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  61. data/generated/google/apis/classroom_v1.rb +1 -1
  62. data/generated/google/apis/classroom_v1/classes.rb +183 -37
  63. data/generated/google/apis/classroom_v1/representations.rb +74 -9
  64. data/generated/google/apis/classroom_v1/service.rb +403 -38
  65. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  66. data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
  67. data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
  68. data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
  69. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  70. data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
  71. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  72. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  73. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
  74. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
  75. data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
  76. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  77. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
  78. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
  79. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
  80. data/generated/google/apis/compute_beta.rb +1 -1
  81. data/generated/google/apis/compute_beta/classes.rb +2299 -434
  82. data/generated/google/apis/compute_beta/representations.rb +752 -33
  83. data/generated/google/apis/compute_beta/service.rb +6067 -3153
  84. data/generated/google/apis/compute_v1.rb +1 -1
  85. data/generated/google/apis/compute_v1/classes.rb +1681 -207
  86. data/generated/google/apis/compute_v1/representations.rb +552 -0
  87. data/generated/google/apis/compute_v1/service.rb +2797 -1171
  88. data/generated/google/apis/content_v2.rb +1 -1
  89. data/generated/google/apis/content_v2/classes.rb +757 -1
  90. data/generated/google/apis/content_v2/representations.rb +337 -0
  91. data/generated/google/apis/content_v2/service.rb +244 -0
  92. data/generated/google/apis/dataflow_v1b3.rb +38 -0
  93. data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
  94. data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
  95. data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
  96. data/generated/google/apis/dataproc_v1.rb +2 -2
  97. data/generated/google/apis/dataproc_v1/classes.rb +213 -68
  98. data/generated/google/apis/dataproc_v1/representations.rb +38 -0
  99. data/generated/google/apis/dataproc_v1/service.rb +78 -48
  100. data/generated/google/apis/datastore_v1.rb +38 -0
  101. data/generated/google/apis/datastore_v1/classes.rb +1284 -0
  102. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  103. data/generated/google/apis/datastore_v1/service.rb +259 -0
  104. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  105. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  106. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  107. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  108. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  109. data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
  110. data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
  111. data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
  112. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  113. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  114. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  115. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  116. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  117. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  118. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  119. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  120. data/generated/google/apis/dns_v1.rb +1 -1
  121. data/generated/google/apis/dns_v1/classes.rb +1 -1
  122. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  123. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  124. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  125. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  126. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  127. data/generated/google/apis/drive_v2.rb +1 -1
  128. data/generated/google/apis/drive_v2/classes.rb +27 -3
  129. data/generated/google/apis/drive_v2/representations.rb +4 -0
  130. data/generated/google/apis/drive_v2/service.rb +16 -3
  131. data/generated/google/apis/drive_v3.rb +1 -1
  132. data/generated/google/apis/drive_v3/classes.rb +50 -16
  133. data/generated/google/apis/drive_v3/representations.rb +4 -0
  134. data/generated/google/apis/drive_v3/service.rb +12 -2
  135. data/generated/google/apis/fitness_v1.rb +8 -2
  136. data/generated/google/apis/fitness_v1/classes.rb +64 -6
  137. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  138. data/generated/google/apis/fitness_v1/service.rb +17 -18
  139. data/generated/google/apis/fusiontables_v2.rb +1 -1
  140. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  141. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  142. data/generated/google/apis/games_management_v1management.rb +1 -1
  143. data/generated/google/apis/games_v1.rb +1 -1
  144. data/generated/google/apis/genomics_v1.rb +2 -4
  145. data/generated/google/apis/genomics_v1/classes.rb +143 -34
  146. data/generated/google/apis/genomics_v1/representations.rb +48 -11
  147. data/generated/google/apis/genomics_v1/service.rb +35 -37
  148. data/generated/google/apis/gmail_v1.rb +10 -1
  149. data/generated/google/apis/gmail_v1/classes.rb +542 -4
  150. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  151. data/generated/google/apis/gmail_v1/service.rb +898 -1
  152. data/generated/google/apis/groupssettings_v1.rb +1 -1
  153. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  154. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  155. data/generated/google/apis/iam_v1.rb +2 -2
  156. data/generated/google/apis/iam_v1/classes.rb +181 -206
  157. data/generated/google/apis/iam_v1/representations.rb +36 -45
  158. data/generated/google/apis/iam_v1/service.rb +101 -67
  159. data/generated/google/apis/identitytoolkit_v3.rb +4 -1
  160. data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
  161. data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
  162. data/generated/google/apis/language_v1beta1.rb +36 -0
  163. data/generated/google/apis/language_v1beta1/classes.rb +599 -0
  164. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  165. data/generated/google/apis/language_v1beta1/service.rb +152 -0
  166. data/generated/google/apis/logging_v2beta1.rb +6 -6
  167. data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
  168. data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
  169. data/generated/google/apis/logging_v2beta1/service.rb +290 -209
  170. data/generated/google/apis/mirror_v1.rb +2 -2
  171. data/generated/google/apis/mirror_v1/service.rb +1 -1
  172. data/generated/google/apis/monitoring_v3.rb +45 -0
  173. data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
  174. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  175. data/generated/google/apis/monitoring_v3/service.rb +711 -0
  176. data/generated/google/apis/oauth2_v2.rb +1 -1
  177. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  178. data/generated/google/apis/plus_domains_v1.rb +1 -1
  179. data/generated/google/apis/plus_v1.rb +1 -1
  180. data/generated/google/apis/pubsub_v1.rb +1 -1
  181. data/generated/google/apis/pubsub_v1/classes.rb +10 -9
  182. data/generated/google/apis/pubsub_v1/service.rb +128 -27
  183. data/generated/google/apis/qpx_express_v1.rb +1 -1
  184. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  185. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  186. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  187. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  188. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  189. data/generated/google/apis/script_v1.rb +1 -1
  190. data/generated/google/apis/script_v1/classes.rb +6 -0
  191. data/generated/google/apis/script_v1/representations.rb +1 -0
  192. data/generated/google/apis/sheets_v4.rb +1 -1
  193. data/generated/google/apis/sheets_v4/classes.rb +910 -89
  194. data/generated/google/apis/sheets_v4/representations.rb +194 -10
  195. data/generated/google/apis/sheets_v4/service.rb +216 -49
  196. data/generated/google/apis/slides_v1.rb +49 -0
  197. data/generated/google/apis/slides_v1/classes.rb +3926 -0
  198. data/generated/google/apis/slides_v1/representations.rb +1722 -0
  199. data/generated/google/apis/slides_v1/service.rb +202 -0
  200. data/generated/google/apis/speech_v1beta1.rb +34 -0
  201. data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
  202. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  203. data/generated/google/apis/speech_v1beta1/service.rb +271 -0
  204. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  205. data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
  206. data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
  207. data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
  208. data/generated/google/apis/storage_v1.rb +1 -1
  209. data/generated/google/apis/storage_v1/classes.rb +43 -18
  210. data/generated/google/apis/storage_v1/representations.rb +4 -1
  211. data/generated/google/apis/storage_v1/service.rb +5 -2
  212. data/generated/google/apis/translate_v2.rb +2 -2
  213. data/generated/google/apis/translate_v2/service.rb +1 -1
  214. data/generated/google/apis/vision_v1.rb +1 -1
  215. data/generated/google/apis/vision_v1/classes.rb +12 -11
  216. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  217. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  218. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  219. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  220. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  221. data/generated/google/apis/youtube_v3.rb +1 -1
  222. data/generated/google/apis/youtube_v3/classes.rb +183 -21
  223. data/generated/google/apis/youtube_v3/representations.rb +85 -4
  224. data/generated/google/apis/youtube_v3/service.rb +41 -5
  225. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  226. data/google-api-client.gemspec +2 -1
  227. data/lib/google/apis/core/api_command.rb +4 -0
  228. data/lib/google/apis/core/base_service.rb +10 -4
  229. data/lib/google/apis/core/download.rb +7 -2
  230. data/lib/google/apis/core/http_command.rb +5 -1
  231. data/lib/google/apis/core/upload.rb +7 -1
  232. data/lib/google/apis/errors.rb +2 -2
  233. data/lib/google/apis/generator/annotator.rb +6 -0
  234. data/lib/google/apis/version.rb +1 -1
  235. data/samples/cli/lib/samples/bigquery.rb +101 -0
  236. data/samples/cli/lib/samples/sheets.rb +61 -0
  237. data/sync.rb +71 -0
  238. metadata +55 -13
@@ -20,9 +20,9 @@ require 'google/apis/errors'
20
20
  module Google
21
21
  module Apis
22
22
  module LoggingV2beta1
23
- # Google Cloud Logging API
23
+ # Stackdriver Logging API
24
24
  #
25
- # Writes log entries and manages your logs, log sinks, and logs-based metrics.
25
+ # Writes log entries and manages your Stackdriver Logging configuration.
26
26
  #
27
27
  # @example
28
28
  # require 'google/apis/logging_v2beta1'
@@ -46,191 +46,192 @@ module Google
46
46
  super('https://logging.googleapis.com/', '')
47
47
  end
48
48
 
49
- # Deletes a log and all its log entries. The log will reappear if it receives
50
- # new entries.
51
- # @param [String] log_name
52
- # Required. The resource name of the log to delete. Example: `"projects/my-
53
- # project/logs/syslog"`.
54
- # @param [String] fields
55
- # Selector specifying which fields to include in a partial response.
49
+ # Creates or updates a logs-based metric.
50
+ # @param [String] metric_name
51
+ # The resource name of the metric to update.
52
+ # Example: `"projects/my-project-id/metrics/my-metric-id"`.
53
+ # The updated metric must be provided in the request and have the
54
+ # same identifier that is specified in `metricName`.
55
+ # If the metric does not exist, it is created.
56
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
56
57
  # @param [String] quota_user
57
58
  # Available to use for quota purposes for server-side applications. Can be any
58
59
  # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
59
62
  # @param [Google::Apis::RequestOptions] options
60
63
  # Request-specific options
61
64
  #
62
65
  # @yield [result, err] Result & error if block supplied
63
- # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
66
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
64
67
  # @yieldparam err [StandardError] error object if request failed
65
68
  #
66
- # @return [Google::Apis::LoggingV2beta1::Empty]
69
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
67
70
  #
68
71
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
69
72
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
70
73
  # @raise [Google::Apis::AuthorizationError] Authorization is required
71
- def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block)
72
- command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
73
- command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
74
- command.response_class = Google::Apis::LoggingV2beta1::Empty
75
- command.params['logName'] = log_name unless log_name.nil?
76
- command.query['fields'] = fields unless fields.nil?
74
+ def update_project_metric(metric_name, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block)
75
+ command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
76
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
77
+ command.request_object = log_metric_object
78
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
79
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
80
+ command.params['metricName'] = metric_name unless metric_name.nil?
77
81
  command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ command.query['fields'] = fields unless fields.nil?
78
83
  execute_or_queue_command(command, &block)
79
84
  end
80
85
 
81
- # Lists sinks.
82
- # @param [String] project_name
83
- # Required. The resource name of the project containing the sinks. Example: `"
84
- # projects/my-logging-project"`.
85
- # @param [String] page_token
86
- # Optional. If the `pageToken` parameter is supplied, then the next page of
87
- # results is retrieved. The `pageToken` parameter must be set to the value of
88
- # the `nextPageToken` from the previous response. The value of `projectName`
89
- # must be the same as in the previous request.
90
- # @param [Fixnum] page_size
91
- # Optional. The maximum number of results to return from this request. You must
92
- # check for presence of `nextPageToken` to determine if additional results are
93
- # available, which you can retrieve by passing the `nextPageToken` value as the `
94
- # pageToken` parameter in the next request.
95
- # @param [String] fields
96
- # Selector specifying which fields to include in a partial response.
86
+ # Gets a logs-based metric.
87
+ # @param [String] metric_name
88
+ # The resource name of the desired metric.
89
+ # Example: `"projects/my-project-id/metrics/my-metric-id"`.
97
90
  # @param [String] quota_user
98
91
  # Available to use for quota purposes for server-side applications. Can be any
99
92
  # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
100
95
  # @param [Google::Apis::RequestOptions] options
101
96
  # Request-specific options
102
97
  #
103
98
  # @yield [result, err] Result & error if block supplied
104
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object
99
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
105
100
  # @yieldparam err [StandardError] error object if request failed
106
101
  #
107
- # @return [Google::Apis::LoggingV2beta1::ListSinksResponse]
102
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
108
103
  #
109
104
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
105
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
106
  # @raise [Google::Apis::AuthorizationError] Authorization is required
112
- def list_project_sinks(project_name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
113
- command = make_simple_command(:get, 'v2beta1/{+projectName}/sinks', options)
114
- command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
115
- command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
116
- command.params['projectName'] = project_name unless project_name.nil?
117
- command.query['pageToken'] = page_token unless page_token.nil?
118
- command.query['pageSize'] = page_size unless page_size.nil?
119
- command.query['fields'] = fields unless fields.nil?
107
+ def get_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
108
+ command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
109
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
110
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
111
+ command.params['metricName'] = metric_name unless metric_name.nil?
120
112
  command.query['quotaUser'] = quota_user unless quota_user.nil?
113
+ command.query['fields'] = fields unless fields.nil?
121
114
  execute_or_queue_command(command, &block)
122
115
  end
123
116
 
124
- # Gets a sink.
125
- # @param [String] sink_name
126
- # The resource name of the sink to return. Example: `"projects/my-project-id/
127
- # sinks/my-sink-id"`.
128
- # @param [String] fields
129
- # Selector specifying which fields to include in a partial response.
117
+ # Creates a logs-based metric.
118
+ # @param [String] parent
119
+ # The resource name of the project in which to create the metric.
120
+ # Example: `"projects/my-project-id"`.
121
+ # The new metric must be provided in the request.
122
+ # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
130
123
  # @param [String] quota_user
131
124
  # Available to use for quota purposes for server-side applications. Can be any
132
125
  # arbitrary string assigned to a user, but should not exceed 40 characters.
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
133
128
  # @param [Google::Apis::RequestOptions] options
134
129
  # Request-specific options
135
130
  #
136
131
  # @yield [result, err] Result & error if block supplied
137
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
132
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
138
133
  # @yieldparam err [StandardError] error object if request failed
139
134
  #
140
- # @return [Google::Apis::LoggingV2beta1::LogSink]
135
+ # @return [Google::Apis::LoggingV2beta1::LogMetric]
141
136
  #
142
137
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
143
138
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
144
139
  # @raise [Google::Apis::AuthorizationError] Authorization is required
145
- def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
146
- command = make_simple_command(:get, 'v2beta1/{+sinkName}', options)
147
- command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
148
- command.response_class = Google::Apis::LoggingV2beta1::LogSink
149
- command.params['sinkName'] = sink_name unless sink_name.nil?
150
- command.query['fields'] = fields unless fields.nil?
140
+ def create_project_metric(parent, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block)
141
+ command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options)
142
+ command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
143
+ command.request_object = log_metric_object
144
+ command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
145
+ command.response_class = Google::Apis::LoggingV2beta1::LogMetric
146
+ command.params['parent'] = parent unless parent.nil?
151
147
  command.query['quotaUser'] = quota_user unless quota_user.nil?
148
+ command.query['fields'] = fields unless fields.nil?
152
149
  execute_or_queue_command(command, &block)
153
150
  end
154
151
 
155
- # Creates a sink.
156
- # @param [String] project_name
157
- # The resource name of the project in which to create the sink. Example: `"
158
- # projects/my-project-id"`. The new sink must be provided in the request.
159
- # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
160
- # @param [String] fields
161
- # Selector specifying which fields to include in a partial response.
152
+ # Lists logs-based metrics.
153
+ # @param [String] parent
154
+ # Required. The resource name containing the metrics.
155
+ # Example: `"projects/my-project-id"`.
156
+ # @param [Fixnum] page_size
157
+ # Optional. The maximum number of results to return from this request.
158
+ # Non-positive values are ignored. The presence of `nextPageToken` in the
159
+ # response indicates that more results might be available.
160
+ # @param [String] page_token
161
+ # Optional. If present, then retrieve the next batch of results from the
162
+ # preceding call to this method. `pageToken` must be the value of
163
+ # `nextPageToken` from the previous response. The values of other method
164
+ # parameters should be identical to those in the previous call.
162
165
  # @param [String] quota_user
163
166
  # Available to use for quota purposes for server-side applications. Can be any
164
167
  # arbitrary string assigned to a user, but should not exceed 40 characters.
168
+ # @param [String] fields
169
+ # Selector specifying which fields to include in a partial response.
165
170
  # @param [Google::Apis::RequestOptions] options
166
171
  # Request-specific options
167
172
  #
168
173
  # @yield [result, err] Result & error if block supplied
169
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
174
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
170
175
  # @yieldparam err [StandardError] error object if request failed
171
176
  #
172
- # @return [Google::Apis::LoggingV2beta1::LogSink]
177
+ # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
173
178
  #
174
179
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
175
180
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
176
181
  # @raise [Google::Apis::AuthorizationError] Authorization is required
177
- def create_project_sink(project_name, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
178
- command = make_simple_command(:post, 'v2beta1/{+projectName}/sinks', options)
179
- command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
180
- command.request_object = log_sink_object
181
- command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
182
- command.response_class = Google::Apis::LoggingV2beta1::LogSink
183
- command.params['projectName'] = project_name unless project_name.nil?
184
- command.query['fields'] = fields unless fields.nil?
182
+ def list_project_metrics(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
183
+ command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options)
184
+ command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
185
+ command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
186
+ command.params['parent'] = parent unless parent.nil?
187
+ command.query['pageSize'] = page_size unless page_size.nil?
188
+ command.query['pageToken'] = page_token unless page_token.nil?
185
189
  command.query['quotaUser'] = quota_user unless quota_user.nil?
190
+ command.query['fields'] = fields unless fields.nil?
186
191
  execute_or_queue_command(command, &block)
187
192
  end
188
193
 
189
- # Creates or updates a sink.
190
- # @param [String] sink_name
191
- # The resource name of the sink to update. Example: `"projects/my-project-id/
192
- # sinks/my-sink-id"`. The updated sink must be provided in the request and have
193
- # the same name that is specified in `sinkName`. If the sink does not exist, it
194
- # is created.
195
- # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
196
- # @param [String] fields
197
- # Selector specifying which fields to include in a partial response.
194
+ # Deletes a logs-based metric.
195
+ # @param [String] metric_name
196
+ # The resource name of the metric to delete.
197
+ # Example: `"projects/my-project-id/metrics/my-metric-id"`.
198
198
  # @param [String] quota_user
199
199
  # Available to use for quota purposes for server-side applications. Can be any
200
200
  # arbitrary string assigned to a user, but should not exceed 40 characters.
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
201
203
  # @param [Google::Apis::RequestOptions] options
202
204
  # Request-specific options
203
205
  #
204
206
  # @yield [result, err] Result & error if block supplied
205
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
207
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
206
208
  # @yieldparam err [StandardError] error object if request failed
207
209
  #
208
- # @return [Google::Apis::LoggingV2beta1::LogSink]
210
+ # @return [Google::Apis::LoggingV2beta1::Empty]
209
211
  #
210
212
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
213
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
214
  # @raise [Google::Apis::AuthorizationError] Authorization is required
213
- def update_project_sink(sink_name, log_sink_object = nil, fields: nil, quota_user: nil, options: nil, &block)
214
- command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
215
- command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
216
- command.request_object = log_sink_object
217
- command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
218
- command.response_class = Google::Apis::LoggingV2beta1::LogSink
219
- command.params['sinkName'] = sink_name unless sink_name.nil?
220
- command.query['fields'] = fields unless fields.nil?
215
+ def delete_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block)
216
+ command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
217
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
218
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
219
+ command.params['metricName'] = metric_name unless metric_name.nil?
221
220
  command.query['quotaUser'] = quota_user unless quota_user.nil?
221
+ command.query['fields'] = fields unless fields.nil?
222
222
  execute_or_queue_command(command, &block)
223
223
  end
224
224
 
225
- # Deletes a sink.
226
- # @param [String] sink_name
227
- # The resource name of the sink to delete. Example: `"projects/my-project-id/
228
- # sinks/my-sink-id"`.
229
- # @param [String] fields
230
- # Selector specifying which fields to include in a partial response.
225
+ # Deletes a log and all its log entries.
226
+ # The log will reappear if it receives new entries.
227
+ # @param [String] log_name
228
+ # Required. The resource name of the log to delete. Example:
229
+ # `"projects/my-project/logs/syslog"`.
231
230
  # @param [String] quota_user
232
231
  # Available to use for quota purposes for server-side applications. Can be any
233
232
  # arbitrary string assigned to a user, but should not exceed 40 characters.
233
+ # @param [String] fields
234
+ # Selector specifying which fields to include in a partial response.
234
235
  # @param [Google::Apis::RequestOptions] options
235
236
  # Request-specific options
236
237
  #
@@ -243,169 +244,216 @@ module Google
243
244
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
244
245
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
245
246
  # @raise [Google::Apis::AuthorizationError] Authorization is required
246
- def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block)
247
- command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
247
+ def delete_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
248
+ command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
248
249
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
249
250
  command.response_class = Google::Apis::LoggingV2beta1::Empty
250
- command.params['sinkName'] = sink_name unless sink_name.nil?
251
- command.query['fields'] = fields unless fields.nil?
251
+ command.params['logName'] = log_name unless log_name.nil?
252
252
  command.query['quotaUser'] = quota_user unless quota_user.nil?
253
+ command.query['fields'] = fields unless fields.nil?
253
254
  execute_or_queue_command(command, &block)
254
255
  end
255
256
 
256
- # Lists logs-based metrics.
257
- # @param [String] project_name
258
- # Required. The resource name of the project containing the metrics. Example: `"
259
- # projects/my-project-id"`.
260
- # @param [String] page_token
261
- # Optional. If the `pageToken` parameter is supplied, then the next page of
262
- # results is retrieved. The `pageToken` parameter must be set to the value of
263
- # the `nextPageToken` from the previous response. The value of `projectName`
264
- # must be the same as in the previous request.
265
- # @param [Fixnum] page_size
266
- # Optional. The maximum number of results to return from this request. You must
267
- # check for presence of `nextPageToken` to determine if additional results are
268
- # available, which you can retrieve by passing the `nextPageToken` value as the `
269
- # pageToken` parameter in the next request.
270
- # @param [String] fields
271
- # Selector specifying which fields to include in a partial response.
257
+ # Updates or creates a sink.
258
+ # @param [String] sink_name
259
+ # Required. The resource name of the sink to update, including the parent
260
+ # resource and the sink identifier. If the sink does not exist, this method
261
+ # creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`.
262
+ # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
263
+ # @param [Boolean] unique_writer_identity
264
+ # Optional. Whether the sink will have a dedicated service account returned
265
+ # in the sink's writer_identity. Set this field to be true to export
266
+ # logs from one project to a different project. This field is ignored for
267
+ # non-project sinks (e.g. organization sinks) because those sinks are
268
+ # required to have dedicated service accounts.
272
269
  # @param [String] quota_user
273
270
  # Available to use for quota purposes for server-side applications. Can be any
274
271
  # arbitrary string assigned to a user, but should not exceed 40 characters.
272
+ # @param [String] fields
273
+ # Selector specifying which fields to include in a partial response.
275
274
  # @param [Google::Apis::RequestOptions] options
276
275
  # Request-specific options
277
276
  #
278
277
  # @yield [result, err] Result & error if block supplied
279
- # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object
278
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
280
279
  # @yieldparam err [StandardError] error object if request failed
281
280
  #
282
- # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse]
281
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
283
282
  #
284
283
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
285
284
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
286
285
  # @raise [Google::Apis::AuthorizationError] Authorization is required
287
- def list_project_metrics(project_name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
288
- command = make_simple_command(:get, 'v2beta1/{+projectName}/metrics', options)
289
- command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation
290
- command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse
291
- command.params['projectName'] = project_name unless project_name.nil?
292
- command.query['pageToken'] = page_token unless page_token.nil?
293
- command.query['pageSize'] = page_size unless page_size.nil?
294
- command.query['fields'] = fields unless fields.nil?
286
+ def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
287
+ command = make_simple_command(:put, 'v2beta1/{+sinkName}', options)
288
+ command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
289
+ command.request_object = log_sink_object
290
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
291
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
292
+ command.params['sinkName'] = sink_name unless sink_name.nil?
293
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
295
294
  command.query['quotaUser'] = quota_user unless quota_user.nil?
295
+ command.query['fields'] = fields unless fields.nil?
296
296
  execute_or_queue_command(command, &block)
297
297
  end
298
298
 
299
- # Gets a logs-based metric.
300
- # @param [String] metric_name
301
- # The resource name of the desired metric. Example: `"projects/my-project-id/
302
- # metrics/my-metric-id"`.
303
- # @param [String] fields
304
- # Selector specifying which fields to include in a partial response.
299
+ # Gets a sink.
300
+ # @param [String] sink_name
301
+ # Required. The resource name of the sink to return.
302
+ # Example: `"projects/my-project-id/sinks/my-sink-id"`.
305
303
  # @param [String] quota_user
306
304
  # Available to use for quota purposes for server-side applications. Can be any
307
305
  # arbitrary string assigned to a user, but should not exceed 40 characters.
306
+ # @param [String] fields
307
+ # Selector specifying which fields to include in a partial response.
308
308
  # @param [Google::Apis::RequestOptions] options
309
309
  # Request-specific options
310
310
  #
311
311
  # @yield [result, err] Result & error if block supplied
312
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
312
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
313
313
  # @yieldparam err [StandardError] error object if request failed
314
314
  #
315
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
315
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
316
316
  #
317
317
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
318
318
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
319
319
  # @raise [Google::Apis::AuthorizationError] Authorization is required
320
- def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
321
- command = make_simple_command(:get, 'v2beta1/{+metricName}', options)
322
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
323
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
324
- command.params['metricName'] = metric_name unless metric_name.nil?
325
- command.query['fields'] = fields unless fields.nil?
320
+ def get_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
321
+ command = make_simple_command(:get, 'v2beta1/{+sinkName}', options)
322
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
323
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
324
+ command.params['sinkName'] = sink_name unless sink_name.nil?
326
325
  command.query['quotaUser'] = quota_user unless quota_user.nil?
326
+ command.query['fields'] = fields unless fields.nil?
327
327
  execute_or_queue_command(command, &block)
328
328
  end
329
329
 
330
- # Creates a logs-based metric.
331
- # @param [String] project_name
332
- # The resource name of the project in which to create the metric. Example: `"
333
- # projects/my-project-id"`. The new metric must be provided in the request.
334
- # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
335
- # @param [String] fields
336
- # Selector specifying which fields to include in a partial response.
330
+ # Creates a sink.
331
+ # @param [String] parent
332
+ # Required. The resource in which to create the sink.
333
+ # Example: `"projects/my-project-id"`.
334
+ # The new sink must be provided in the request.
335
+ # @param [Google::Apis::LoggingV2beta1::LogSink] log_sink_object
336
+ # @param [Boolean] unique_writer_identity
337
+ # Optional. Whether the sink will have a dedicated service account returned
338
+ # in the sink's writer_identity. Set this field to be true to export
339
+ # logs from one project to a different project. This field is ignored for
340
+ # non-project sinks (e.g. organization sinks) because those sinks are
341
+ # required to have dedicated service accounts.
337
342
  # @param [String] quota_user
338
343
  # Available to use for quota purposes for server-side applications. Can be any
339
344
  # arbitrary string assigned to a user, but should not exceed 40 characters.
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
340
347
  # @param [Google::Apis::RequestOptions] options
341
348
  # Request-specific options
342
349
  #
343
350
  # @yield [result, err] Result & error if block supplied
344
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
351
+ # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object
345
352
  # @yieldparam err [StandardError] error object if request failed
346
353
  #
347
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
354
+ # @return [Google::Apis::LoggingV2beta1::LogSink]
348
355
  #
349
356
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
350
357
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
351
358
  # @raise [Google::Apis::AuthorizationError] Authorization is required
352
- def create_project_metric(project_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
353
- command = make_simple_command(:post, 'v2beta1/{+projectName}/metrics', options)
354
- command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
355
- command.request_object = log_metric_object
356
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
357
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
358
- command.params['projectName'] = project_name unless project_name.nil?
359
- command.query['fields'] = fields unless fields.nil?
359
+ def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block)
360
+ command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options)
361
+ command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
362
+ command.request_object = log_sink_object
363
+ command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation
364
+ command.response_class = Google::Apis::LoggingV2beta1::LogSink
365
+ command.params['parent'] = parent unless parent.nil?
366
+ command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil?
360
367
  command.query['quotaUser'] = quota_user unless quota_user.nil?
368
+ command.query['fields'] = fields unless fields.nil?
361
369
  execute_or_queue_command(command, &block)
362
370
  end
363
371
 
364
- # Creates or updates a logs-based metric.
365
- # @param [String] metric_name
366
- # The resource name of the metric to update. Example: `"projects/my-project-id/
367
- # metrics/my-metric-id"`. The updated metric must be provided in the request and
368
- # have the same identifier that is specified in `metricName`. If the metric does
369
- # not exist, it is created.
370
- # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object
371
- # @param [String] fields
372
- # Selector specifying which fields to include in a partial response.
372
+ # Lists sinks.
373
+ # @param [String] parent
374
+ # Required. The resource name where this sink was created.
375
+ # Example: `"projects/my-logging-project"`.
376
+ # @param [Fixnum] page_size
377
+ # Optional. The maximum number of results to return from this request.
378
+ # Non-positive values are ignored. The presence of `nextPageToken` in the
379
+ # response indicates that more results might be available.
380
+ # @param [String] page_token
381
+ # Optional. If present, then retrieve the next batch of results from the
382
+ # preceding call to this method. `pageToken` must be the value of
383
+ # `nextPageToken` from the previous response. The values of other method
384
+ # parameters should be identical to those in the previous call.
373
385
  # @param [String] quota_user
374
386
  # Available to use for quota purposes for server-side applications. Can be any
375
387
  # arbitrary string assigned to a user, but should not exceed 40 characters.
388
+ # @param [String] fields
389
+ # Selector specifying which fields to include in a partial response.
376
390
  # @param [Google::Apis::RequestOptions] options
377
391
  # Request-specific options
378
392
  #
379
393
  # @yield [result, err] Result & error if block supplied
380
- # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object
394
+ # @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object
381
395
  # @yieldparam err [StandardError] error object if request failed
382
396
  #
383
- # @return [Google::Apis::LoggingV2beta1::LogMetric]
397
+ # @return [Google::Apis::LoggingV2beta1::ListSinksResponse]
384
398
  #
385
399
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
386
400
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
387
401
  # @raise [Google::Apis::AuthorizationError] Authorization is required
388
- def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block)
389
- command = make_simple_command(:put, 'v2beta1/{+metricName}', options)
390
- command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
391
- command.request_object = log_metric_object
392
- command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation
393
- command.response_class = Google::Apis::LoggingV2beta1::LogMetric
394
- command.params['metricName'] = metric_name unless metric_name.nil?
395
- command.query['fields'] = fields unless fields.nil?
402
+ def list_project_sinks(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
403
+ command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options)
404
+ command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation
405
+ command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse
406
+ command.params['parent'] = parent unless parent.nil?
407
+ command.query['pageSize'] = page_size unless page_size.nil?
408
+ command.query['pageToken'] = page_token unless page_token.nil?
396
409
  command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ command.query['fields'] = fields unless fields.nil?
397
411
  execute_or_queue_command(command, &block)
398
412
  end
399
413
 
400
- # Deletes a logs-based metric.
401
- # @param [String] metric_name
402
- # The resource name of the metric to delete. Example: `"projects/my-project-id/
403
- # metrics/my-metric-id"`.
414
+ # Deletes a sink.
415
+ # @param [String] sink_name
416
+ # Required. The resource name of the sink to delete, including the parent
417
+ # resource and the sink identifier. Example:
418
+ # `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink
419
+ # does not exist.
420
+ # @param [String] quota_user
421
+ # Available to use for quota purposes for server-side applications. Can be any
422
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
404
423
  # @param [String] fields
405
424
  # Selector specifying which fields to include in a partial response.
425
+ # @param [Google::Apis::RequestOptions] options
426
+ # Request-specific options
427
+ #
428
+ # @yield [result, err] Result & error if block supplied
429
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
430
+ # @yieldparam err [StandardError] error object if request failed
431
+ #
432
+ # @return [Google::Apis::LoggingV2beta1::Empty]
433
+ #
434
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
435
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
436
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
437
+ def delete_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block)
438
+ command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options)
439
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
440
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
441
+ command.params['sinkName'] = sink_name unless sink_name.nil?
442
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
443
+ command.query['fields'] = fields unless fields.nil?
444
+ execute_or_queue_command(command, &block)
445
+ end
446
+
447
+ # Deletes a log and all its log entries.
448
+ # The log will reappear if it receives new entries.
449
+ # @param [String] log_name
450
+ # Required. The resource name of the log to delete. Example:
451
+ # `"projects/my-project/logs/syslog"`.
406
452
  # @param [String] quota_user
407
453
  # Available to use for quota purposes for server-side applications. Can be any
408
454
  # arbitrary string assigned to a user, but should not exceed 40 characters.
455
+ # @param [String] fields
456
+ # Selector specifying which fields to include in a partial response.
409
457
  # @param [Google::Apis::RequestOptions] options
410
458
  # Request-specific options
411
459
  #
@@ -418,24 +466,24 @@ module Google
418
466
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
419
467
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
420
468
  # @raise [Google::Apis::AuthorizationError] Authorization is required
421
- def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block)
422
- command = make_simple_command(:delete, 'v2beta1/{+metricName}', options)
469
+ def delete_organization_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
470
+ command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
423
471
  command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
424
472
  command.response_class = Google::Apis::LoggingV2beta1::Empty
425
- command.params['metricName'] = metric_name unless metric_name.nil?
426
- command.query['fields'] = fields unless fields.nil?
473
+ command.params['logName'] = log_name unless log_name.nil?
427
474
  command.query['quotaUser'] = quota_user unless quota_user.nil?
475
+ command.query['fields'] = fields unless fields.nil?
428
476
  execute_or_queue_command(command, &block)
429
477
  end
430
478
 
431
- # Writes log entries to Cloud Logging. All log entries in Cloud Logging are
479
+ # Writes log entries to Stackdriver Logging. All log entries are
432
480
  # written by this method.
433
481
  # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object
434
- # @param [String] fields
435
- # Selector specifying which fields to include in a partial response.
436
482
  # @param [String] quota_user
437
483
  # Available to use for quota purposes for server-side applications. Can be any
438
484
  # arbitrary string assigned to a user, but should not exceed 40 characters.
485
+ # @param [String] fields
486
+ # Selector specifying which fields to include in a partial response.
439
487
  # @param [Google::Apis::RequestOptions] options
440
488
  # Request-specific options
441
489
  #
@@ -448,25 +496,26 @@ module Google
448
496
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
449
497
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
450
498
  # @raise [Google::Apis::AuthorizationError] Authorization is required
451
- def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
499
+ def write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
452
500
  command = make_simple_command(:post, 'v2beta1/entries:write', options)
453
501
  command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation
454
502
  command.request_object = write_log_entries_request_object
455
503
  command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation
456
504
  command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse
457
- command.query['fields'] = fields unless fields.nil?
458
505
  command.query['quotaUser'] = quota_user unless quota_user.nil?
506
+ command.query['fields'] = fields unless fields.nil?
459
507
  execute_or_queue_command(command, &block)
460
508
  end
461
509
 
462
- # Lists log entries. Use this method to retrieve log entries from Cloud Logging.
463
- # For ways to export log entries, see [Exporting Logs](/logging/docs/export).
510
+ # Lists log entries. Use this method to retrieve log entries from Cloud
511
+ # Logging. For ways to export log entries, see
512
+ # [Exporting Logs](/logging/docs/export).
464
513
  # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object
465
- # @param [String] fields
466
- # Selector specifying which fields to include in a partial response.
467
514
  # @param [String] quota_user
468
515
  # Available to use for quota purposes for server-side applications. Can be any
469
516
  # arbitrary string assigned to a user, but should not exceed 40 characters.
517
+ # @param [String] fields
518
+ # Selector specifying which fields to include in a partial response.
470
519
  # @param [Google::Apis::RequestOptions] options
471
520
  # Request-specific options
472
521
  #
@@ -479,32 +528,32 @@ module Google
479
528
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
529
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
530
  # @raise [Google::Apis::AuthorizationError] Authorization is required
482
- def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
531
+ def list_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
483
532
  command = make_simple_command(:post, 'v2beta1/entries:list', options)
484
533
  command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation
485
534
  command.request_object = list_log_entries_request_object
486
535
  command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation
487
536
  command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse
488
- command.query['fields'] = fields unless fields.nil?
489
537
  command.query['quotaUser'] = quota_user unless quota_user.nil?
538
+ command.query['fields'] = fields unless fields.nil?
490
539
  execute_or_queue_command(command, &block)
491
540
  end
492
541
 
493
- # Lists monitored resource descriptors that are used by Cloud Logging.
542
+ # Lists the monitored resource descriptors used by Stackdriver Logging.
494
543
  # @param [Fixnum] page_size
495
- # Optional. The maximum number of results to return from this request. You must
496
- # check for presence of `nextPageToken` to determine if additional results are
497
- # available, which you can retrieve by passing the `nextPageToken` value as the `
498
- # pageToken` parameter in the next request.
544
+ # Optional. The maximum number of results to return from this request.
545
+ # Non-positive values are ignored. The presence of `nextPageToken` in the
546
+ # response indicates that more results might be available.
499
547
  # @param [String] page_token
500
- # Optional. If the `pageToken` parameter is supplied, then the next page of
501
- # results is retrieved. The `pageToken` parameter must be set to the value of
502
- # the `nextPageToken` from the previous response.
503
- # @param [String] fields
504
- # Selector specifying which fields to include in a partial response.
548
+ # Optional. If present, then retrieve the next batch of results from the
549
+ # preceding call to this method. `pageToken` must be the value of
550
+ # `nextPageToken` from the previous response. The values of other method
551
+ # parameters should be identical to those in the previous call.
505
552
  # @param [String] quota_user
506
553
  # Available to use for quota purposes for server-side applications. Can be any
507
554
  # arbitrary string assigned to a user, but should not exceed 40 characters.
555
+ # @param [String] fields
556
+ # Selector specifying which fields to include in a partial response.
508
557
  # @param [Google::Apis::RequestOptions] options
509
558
  # Request-specific options
510
559
  #
@@ -517,14 +566,46 @@ module Google
517
566
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
518
567
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
519
568
  # @raise [Google::Apis::AuthorizationError] Authorization is required
520
- def list_monitored_resource_descriptors(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
569
+ def list_monitored_resource_descriptors(page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
521
570
  command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options)
522
571
  command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation
523
572
  command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse
524
573
  command.query['pageSize'] = page_size unless page_size.nil?
525
574
  command.query['pageToken'] = page_token unless page_token.nil?
575
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
526
576
  command.query['fields'] = fields unless fields.nil?
577
+ execute_or_queue_command(command, &block)
578
+ end
579
+
580
+ # Deletes a log and all its log entries.
581
+ # The log will reappear if it receives new entries.
582
+ # @param [String] log_name
583
+ # Required. The resource name of the log to delete. Example:
584
+ # `"projects/my-project/logs/syslog"`.
585
+ # @param [String] quota_user
586
+ # Available to use for quota purposes for server-side applications. Can be any
587
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
588
+ # @param [String] fields
589
+ # Selector specifying which fields to include in a partial response.
590
+ # @param [Google::Apis::RequestOptions] options
591
+ # Request-specific options
592
+ #
593
+ # @yield [result, err] Result & error if block supplied
594
+ # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object
595
+ # @yieldparam err [StandardError] error object if request failed
596
+ #
597
+ # @return [Google::Apis::LoggingV2beta1::Empty]
598
+ #
599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
602
+ def delete_billing_account_log(log_name, quota_user: nil, fields: nil, options: nil, &block)
603
+ command = make_simple_command(:delete, 'v2beta1/{+logName}', options)
604
+ command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation
605
+ command.response_class = Google::Apis::LoggingV2beta1::Empty
606
+ command.params['logName'] = log_name unless log_name.nil?
527
607
  command.query['quotaUser'] = quota_user unless quota_user.nil?
608
+ command.query['fields'] = fields unless fields.nil?
528
609
  execute_or_queue_command(command, &block)
529
610
  end
530
611