google-api-client 0.23.0 → 0.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +114 -0
  3. data/CODE_OF_CONDUCT.md +43 -0
  4. data/MIGRATING.md +1 -5
  5. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1 -1
  8. data/generated/google/apis/admin_directory_v1.rb +1 -1
  9. data/generated/google/apis/admin_directory_v1/service.rb +3 -3
  10. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  11. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  12. data/generated/google/apis/androidmanagement_v1/classes.rb +7 -3
  13. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  14. data/generated/google/apis/androidpublisher_v2/classes.rb +9 -0
  15. data/generated/google/apis/androidpublisher_v2/representations.rb +1 -0
  16. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  17. data/generated/google/apis/androidpublisher_v3/classes.rb +9 -0
  18. data/generated/google/apis/androidpublisher_v3/representations.rb +1 -0
  19. data/generated/google/apis/appengine_v1.rb +1 -1
  20. data/generated/google/apis/appengine_v1/classes.rb +34 -1
  21. data/generated/google/apis/appengine_v1/representations.rb +16 -0
  22. data/generated/google/apis/appengine_v1alpha.rb +1 -1
  23. data/generated/google/apis/appengine_v1beta.rb +1 -1
  24. data/generated/google/apis/appengine_v1beta/classes.rb +67 -3
  25. data/generated/google/apis/appengine_v1beta/representations.rb +32 -0
  26. data/generated/google/apis/appengine_v1beta4.rb +1 -1
  27. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  28. data/generated/google/apis/appsmarket_v2.rb +1 -1
  29. data/generated/google/apis/bigquery_v2.rb +1 -1
  30. data/generated/google/apis/bigquery_v2/classes.rb +6 -4
  31. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  32. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +4 -6
  33. data/generated/google/apis/chat_v1.rb +2 -2
  34. data/generated/google/apis/chat_v1/classes.rb +76 -0
  35. data/generated/google/apis/chat_v1/representations.rb +25 -0
  36. data/generated/google/apis/chat_v1/service.rb +1 -1
  37. data/generated/google/apis/classroom_v1.rb +1 -1
  38. data/generated/google/apis/classroom_v1/classes.rb +1 -1
  39. data/generated/google/apis/classroom_v1/service.rb +12 -12
  40. data/generated/google/apis/cloudbuild_v1.rb +2 -2
  41. data/generated/google/apis/cloudbuild_v1/classes.rb +21 -33
  42. data/generated/google/apis/cloudbuild_v1/service.rb +1 -1
  43. data/generated/google/apis/clouddebugger_v2.rb +1 -1
  44. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  45. data/generated/google/apis/cloudfunctions_v1/classes.rb +31 -0
  46. data/generated/google/apis/cloudfunctions_v1/representations.rb +3 -0
  47. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  48. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +31 -0
  49. data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +3 -0
  50. data/generated/google/apis/cloudiot_v1.rb +1 -1
  51. data/generated/google/apis/cloudiot_v1/service.rb +0 -331
  52. data/generated/google/apis/cloudkms_v1.rb +1 -1
  53. data/generated/google/apis/cloudkms_v1/classes.rb +0 -1
  54. data/generated/google/apis/cloudkms_v1/service.rb +1 -1
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +66 -22
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +1 -0
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +40 -0
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  60. data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
  61. data/generated/google/apis/cloudresourcemanager_v2/classes.rb +7 -3
  62. data/generated/google/apis/cloudresourcemanager_v2/service.rb +38 -6
  63. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
  64. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +9 -5
  65. data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +51 -19
  66. data/generated/google/apis/cloudshell_v1.rb +1 -1
  67. data/generated/google/apis/cloudshell_v1alpha1.rb +1 -1
  68. data/generated/google/apis/cloudtasks_v2beta2.rb +2 -3
  69. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +9 -12
  70. data/generated/google/apis/cloudtasks_v2beta2/service.rb +4 -11
  71. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  72. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  73. data/generated/google/apis/composer_v1beta1.rb +1 -1
  74. data/generated/google/apis/composer_v1beta1/classes.rb +1 -1
  75. data/generated/google/apis/compute_alpha.rb +1 -1
  76. data/generated/google/apis/compute_alpha/classes.rb +49 -18
  77. data/generated/google/apis/compute_alpha/representations.rb +6 -1
  78. data/generated/google/apis/compute_beta.rb +1 -1
  79. data/generated/google/apis/compute_beta/classes.rb +1114 -103
  80. data/generated/google/apis/compute_beta/representations.rb +431 -0
  81. data/generated/google/apis/compute_beta/service.rb +605 -0
  82. data/generated/google/apis/compute_v1.rb +1 -1
  83. data/generated/google/apis/compute_v1/classes.rb +95 -1
  84. data/generated/google/apis/compute_v1/representations.rb +33 -0
  85. data/generated/google/apis/container_v1.rb +1 -1
  86. data/generated/google/apis/container_v1/classes.rb +1 -1
  87. data/generated/google/apis/container_v1/service.rb +1 -1
  88. data/generated/google/apis/container_v1beta1.rb +1 -1
  89. data/generated/google/apis/container_v1beta1/classes.rb +348 -2
  90. data/generated/google/apis/container_v1beta1/representations.rb +121 -0
  91. data/generated/google/apis/container_v1beta1/service.rb +114 -2
  92. data/generated/google/apis/content_v2.rb +1 -1
  93. data/generated/google/apis/content_v2/classes.rb +147 -0
  94. data/generated/google/apis/content_v2/representations.rb +65 -0
  95. data/generated/google/apis/content_v2/service.rb +81 -1
  96. data/generated/google/apis/content_v2sandbox.rb +1 -1
  97. data/generated/google/apis/content_v2sandbox/classes.rb +7 -0
  98. data/generated/google/apis/content_v2sandbox/representations.rb +1 -0
  99. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  100. data/generated/google/apis/dataflow_v1b3/classes.rb +262 -0
  101. data/generated/google/apis/dataflow_v1b3/representations.rb +130 -0
  102. data/generated/google/apis/dataproc_v1.rb +1 -1
  103. data/generated/google/apis/dataproc_v1/classes.rb +164 -1
  104. data/generated/google/apis/dataproc_v1/representations.rb +70 -0
  105. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  106. data/generated/google/apis/dataproc_v1beta2/classes.rb +28 -2
  107. data/generated/google/apis/dataproc_v1beta2/representations.rb +15 -0
  108. data/generated/google/apis/datastore_v1.rb +1 -1
  109. data/generated/google/apis/datastore_v1beta1.rb +1 -1
  110. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  111. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  112. data/generated/google/apis/deploymentmanager_alpha/service.rb +1 -1
  113. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  114. data/generated/google/apis/deploymentmanager_v2beta/service.rb +1 -1
  115. data/generated/google/apis/dialogflow_v2.rb +1 -1
  116. data/generated/google/apis/dialogflow_v2/classes.rb +40 -21
  117. data/generated/google/apis/dialogflow_v2/representations.rb +2 -0
  118. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  119. data/generated/google/apis/dialogflow_v2beta1/classes.rb +43 -28
  120. data/generated/google/apis/dialogflow_v2beta1/representations.rb +2 -0
  121. data/generated/google/apis/dialogflow_v2beta1/service.rb +74 -110
  122. data/generated/google/apis/digitalassetlinks_v1.rb +1 -1
  123. data/generated/google/apis/dlp_v2.rb +1 -1
  124. data/generated/google/apis/dlp_v2/classes.rb +70 -26
  125. data/generated/google/apis/dlp_v2/representations.rb +3 -0
  126. data/generated/google/apis/dlp_v2/service.rb +78 -17
  127. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  128. data/generated/google/apis/firebaserules_v1.rb +1 -1
  129. data/generated/google/apis/firebaserules_v1/classes.rb +33 -0
  130. data/generated/google/apis/firebaserules_v1/representations.rb +17 -0
  131. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  132. data/generated/google/apis/firestore_v1beta1/classes.rb +137 -125
  133. data/generated/google/apis/firestore_v1beta1/representations.rb +39 -35
  134. data/generated/google/apis/firestore_v1beta1/service.rb +16 -16
  135. data/generated/google/apis/genomics_v1.rb +1 -1
  136. data/generated/google/apis/genomics_v1/classes.rb +0 -1
  137. data/generated/google/apis/genomics_v1alpha2.rb +1 -1
  138. data/generated/google/apis/genomics_v2alpha1.rb +1 -1
  139. data/generated/google/apis/genomics_v2alpha1/classes.rb +17 -3
  140. data/generated/google/apis/genomics_v2alpha1/representations.rb +1 -0
  141. data/generated/google/apis/iam_v1.rb +1 -1
  142. data/generated/google/apis/{sqladmin_v1beta3.rb → iamcredentials_v1.rb} +9 -13
  143. data/generated/google/apis/iamcredentials_v1/classes.rb +272 -0
  144. data/generated/google/apis/iamcredentials_v1/representations.rb +139 -0
  145. data/generated/google/apis/iamcredentials_v1/service.rb +207 -0
  146. data/generated/google/apis/indexing_v3.rb +32 -0
  147. data/generated/google/apis/indexing_v3/classes.rb +115 -0
  148. data/generated/google/apis/indexing_v3/representations.rb +72 -0
  149. data/generated/google/apis/indexing_v3/service.rb +122 -0
  150. data/generated/google/apis/jobs_v2.rb +1 -1
  151. data/generated/google/apis/jobs_v2/classes.rb +73 -72
  152. data/generated/google/apis/jobs_v2/representations.rb +0 -1
  153. data/generated/google/apis/jobs_v2/service.rb +8 -7
  154. data/generated/google/apis/language_v1.rb +1 -1
  155. data/generated/google/apis/language_v1beta1.rb +1 -1
  156. data/generated/google/apis/language_v1beta2.rb +1 -1
  157. data/generated/google/apis/logging_v2.rb +1 -1
  158. data/generated/google/apis/logging_v2/classes.rb +42 -0
  159. data/generated/google/apis/logging_v2/representations.rb +17 -0
  160. data/generated/google/apis/logging_v2beta1.rb +1 -1
  161. data/generated/google/apis/logging_v2beta1/classes.rb +42 -0
  162. data/generated/google/apis/logging_v2beta1/representations.rb +17 -0
  163. data/generated/google/apis/manufacturers_v1.rb +1 -1
  164. data/generated/google/apis/ml_v1.rb +1 -1
  165. data/generated/google/apis/ml_v1/classes.rb +17 -0
  166. data/generated/google/apis/ml_v1/representations.rb +1 -0
  167. data/generated/google/apis/ml_v1/service.rb +4 -2
  168. data/generated/google/apis/monitoring_v3.rb +1 -1
  169. data/generated/google/apis/monitoring_v3/classes.rb +91 -7
  170. data/generated/google/apis/monitoring_v3/representations.rb +17 -0
  171. data/generated/google/apis/oslogin_v1.rb +1 -1
  172. data/generated/google/apis/oslogin_v1alpha.rb +1 -1
  173. data/generated/google/apis/oslogin_v1beta.rb +1 -1
  174. data/generated/google/apis/pagespeedonline_v4.rb +1 -1
  175. data/generated/google/apis/partners_v2.rb +1 -1
  176. data/generated/google/apis/people_v1.rb +1 -1
  177. data/generated/google/apis/poly_v1.rb +1 -1
  178. data/generated/google/apis/poly_v1/classes.rb +12 -2
  179. data/generated/google/apis/poly_v1/representations.rb +1 -0
  180. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  181. data/generated/google/apis/pubsub_v1.rb +1 -1
  182. data/generated/google/apis/pubsub_v1/classes.rb +57 -4
  183. data/generated/google/apis/pubsub_v1/representations.rb +19 -0
  184. data/generated/google/apis/pubsub_v1/service.rb +40 -2
  185. data/generated/google/apis/pubsub_v1beta1a.rb +1 -1
  186. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  187. data/generated/google/apis/redis_v1beta1.rb +1 -1
  188. data/generated/google/apis/runtimeconfig_v1.rb +1 -1
  189. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  190. data/generated/google/apis/safebrowsing_v4.rb +1 -1
  191. data/generated/google/apis/script_v1.rb +4 -1
  192. data/generated/google/apis/searchconsole_v1.rb +1 -1
  193. data/generated/google/apis/servicebroker_v1.rb +1 -1
  194. data/generated/google/apis/servicebroker_v1alpha1.rb +1 -1
  195. data/generated/google/apis/servicebroker_v1beta1.rb +1 -1
  196. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -4
  197. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +42 -0
  198. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +17 -0
  199. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  200. data/generated/google/apis/servicecontrol_v1/classes.rb +284 -0
  201. data/generated/google/apis/servicecontrol_v1/representations.rb +78 -0
  202. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  203. data/generated/google/apis/servicemanagement_v1/classes.rb +42 -0
  204. data/generated/google/apis/servicemanagement_v1/representations.rb +17 -0
  205. data/generated/google/apis/{replicapool_v1beta2.rb → serviceusage_v1.rb} +13 -15
  206. data/generated/google/apis/serviceusage_v1/classes.rb +4020 -0
  207. data/generated/google/apis/serviceusage_v1/representations.rb +1239 -0
  208. data/generated/google/apis/serviceusage_v1/service.rb +423 -0
  209. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  210. data/generated/google/apis/serviceusage_v1beta1/classes.rb +102 -1
  211. data/generated/google/apis/serviceusage_v1beta1/representations.rb +55 -0
  212. data/generated/google/apis/serviceuser_v1.rb +1 -1
  213. data/generated/google/apis/serviceuser_v1/classes.rb +42 -0
  214. data/generated/google/apis/serviceuser_v1/representations.rb +17 -0
  215. data/generated/google/apis/serviceuser_v1/service.rb +2 -2
  216. data/generated/google/apis/sheets_v4.rb +1 -1
  217. data/generated/google/apis/slides_v1.rb +1 -1
  218. data/generated/google/apis/slides_v1/classes.rb +9 -3
  219. data/generated/google/apis/spanner_v1.rb +1 -1
  220. data/generated/google/apis/speech_v1.rb +2 -2
  221. data/generated/google/apis/speech_v1/service.rb +1 -1
  222. data/generated/google/apis/speech_v1beta1.rb +2 -2
  223. data/generated/google/apis/speech_v1beta1/service.rb +1 -1
  224. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  225. data/generated/google/apis/testing_v1.rb +1 -1
  226. data/generated/google/apis/testing_v1/classes.rb +1 -1
  227. data/generated/google/apis/texttospeech_v1beta1.rb +1 -1
  228. data/generated/google/apis/texttospeech_v1beta1/classes.rb +8 -0
  229. data/generated/google/apis/texttospeech_v1beta1/representations.rb +1 -0
  230. data/generated/google/apis/videointelligence_v1.rb +1 -1
  231. data/generated/google/apis/videointelligence_v1/classes.rb +28 -28
  232. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  233. data/generated/google/apis/videointelligence_v1beta2/classes.rb +28 -28
  234. data/generated/google/apis/vision_v1.rb +1 -1
  235. data/generated/google/apis/vision_v1/classes.rb +4 -2
  236. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  237. data/generated/google/apis/vision_v1p1beta1/classes.rb +6 -3
  238. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  239. data/generated/google/apis/vision_v1p2beta1/classes.rb +4 -2
  240. data/generated/google/apis/websecurityscanner_v1alpha.rb +1 -1
  241. data/generated/google/apis/youtube_analytics_v2.rb +1 -1
  242. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  243. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  244. data/lib/google/apis/version.rb +1 -1
  245. metadata +15 -10
  246. data/generated/google/apis/replicapool_v1beta2/classes.rb +0 -633
  247. data/generated/google/apis/replicapool_v1beta2/representations.rb +0 -264
  248. data/generated/google/apis/replicapool_v1beta2/service.rb +0 -583
  249. data/generated/google/apis/sqladmin_v1beta3/classes.rb +0 -1632
  250. data/generated/google/apis/sqladmin_v1beta3/representations.rb +0 -733
  251. data/generated/google/apis/sqladmin_v1beta3/service.rb +0 -995
@@ -0,0 +1,423 @@
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 ServiceusageV1
23
+ # Service Usage API
24
+ #
25
+ # Enables services that service consumers want to use on Google Cloud Platform,
26
+ # lists the available or enabled services, or disables services that service
27
+ # consumers no longer use.
28
+ #
29
+ # @example
30
+ # require 'google/apis/serviceusage_v1'
31
+ #
32
+ # Serviceusage = Google::Apis::ServiceusageV1 # Alias the module
33
+ # service = Serviceusage::ServiceUsageService.new
34
+ #
35
+ # @see https://cloud.google.com/service-usage/
36
+ class ServiceUsageService < Google::Apis::Core::BaseService
37
+ # @return [String]
38
+ # API key. Your API key identifies your project and provides you with API access,
39
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
40
+ attr_accessor :key
41
+
42
+ # @return [String]
43
+ # Available to use for quota purposes for server-side applications. Can be any
44
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
45
+ attr_accessor :quota_user
46
+
47
+ def initialize
48
+ super('https://serviceusage.googleapis.com/', '')
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Starts asynchronous cancellation on a long-running operation. The server
53
+ # makes a best effort to cancel the operation, but success is not
54
+ # guaranteed. If the server doesn't support this method, it returns
55
+ # `google.rpc.Code.UNIMPLEMENTED`. Clients can use
56
+ # Operations.GetOperation or
57
+ # other methods to check whether the cancellation succeeded or whether the
58
+ # operation completed despite cancellation. On successful cancellation,
59
+ # the operation is not deleted; instead, it becomes an operation with
60
+ # an Operation.error value with a google.rpc.Status.code of 1,
61
+ # corresponding to `Code.CANCELLED`.
62
+ # @param [String] name
63
+ # The name of the operation resource to be cancelled.
64
+ # @param [Google::Apis::ServiceusageV1::CancelOperationRequest] cancel_operation_request_object
65
+ # @param [String] fields
66
+ # Selector specifying which fields to include in a partial response.
67
+ # @param [String] quota_user
68
+ # Available to use for quota purposes for server-side applications. Can be any
69
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::ServiceusageV1::Empty] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::ServiceusageV1::Empty]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
83
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
84
+ command.request_representation = Google::Apis::ServiceusageV1::CancelOperationRequest::Representation
85
+ command.request_object = cancel_operation_request_object
86
+ command.response_representation = Google::Apis::ServiceusageV1::Empty::Representation
87
+ command.response_class = Google::Apis::ServiceusageV1::Empty
88
+ command.params['name'] = name unless name.nil?
89
+ command.query['fields'] = fields unless fields.nil?
90
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
91
+ execute_or_queue_command(command, &block)
92
+ end
93
+
94
+ # Deletes a long-running operation. This method indicates that the client is
95
+ # no longer interested in the operation result. It does not cancel the
96
+ # operation. If the server doesn't support this method, it returns
97
+ # `google.rpc.Code.UNIMPLEMENTED`.
98
+ # @param [String] name
99
+ # The name of the operation resource to be deleted.
100
+ # @param [String] fields
101
+ # Selector specifying which fields to include in a partial response.
102
+ # @param [String] quota_user
103
+ # Available to use for quota purposes for server-side applications. Can be any
104
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
105
+ # @param [Google::Apis::RequestOptions] options
106
+ # Request-specific options
107
+ #
108
+ # @yield [result, err] Result & error if block supplied
109
+ # @yieldparam result [Google::Apis::ServiceusageV1::Empty] parsed result object
110
+ # @yieldparam err [StandardError] error object if request failed
111
+ #
112
+ # @return [Google::Apis::ServiceusageV1::Empty]
113
+ #
114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
117
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
118
+ command = make_simple_command(:delete, 'v1/{+name}', options)
119
+ command.response_representation = Google::Apis::ServiceusageV1::Empty::Representation
120
+ command.response_class = Google::Apis::ServiceusageV1::Empty
121
+ command.params['name'] = name unless name.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 the latest state of a long-running operation. Clients can use this
128
+ # method to poll the operation result at intervals as recommended by the API
129
+ # service.
130
+ # @param [String] name
131
+ # The name of the operation resource.
132
+ # @param [String] fields
133
+ # Selector specifying which fields to include in a partial response.
134
+ # @param [String] quota_user
135
+ # Available to use for quota purposes for server-side applications. Can be any
136
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
137
+ # @param [Google::Apis::RequestOptions] options
138
+ # Request-specific options
139
+ #
140
+ # @yield [result, err] Result & error if block supplied
141
+ # @yieldparam result [Google::Apis::ServiceusageV1::Operation] parsed result object
142
+ # @yieldparam err [StandardError] error object if request failed
143
+ #
144
+ # @return [Google::Apis::ServiceusageV1::Operation]
145
+ #
146
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
147
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
148
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
149
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
150
+ command = make_simple_command(:get, 'v1/{+name}', options)
151
+ command.response_representation = Google::Apis::ServiceusageV1::Operation::Representation
152
+ command.response_class = Google::Apis::ServiceusageV1::Operation
153
+ command.params['name'] = name unless name.nil?
154
+ command.query['fields'] = fields unless fields.nil?
155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
156
+ execute_or_queue_command(command, &block)
157
+ end
158
+
159
+ # Lists operations that match the specified filter in the request. If the
160
+ # server doesn't support this method, it returns `UNIMPLEMENTED`.
161
+ # NOTE: the `name` binding allows API services to override the binding
162
+ # to use different resource name schemes, such as `users/*/operations`. To
163
+ # override the binding, API services can add a binding such as
164
+ # `"/v1/`name=users/*`/operations"` to their service configuration.
165
+ # For backwards compatibility, the default name includes the operations
166
+ # collection id, however overriding users must ensure the name binding
167
+ # is the parent resource, without the operations collection id.
168
+ # @param [String] filter
169
+ # The standard list filter.
170
+ # @param [String] name
171
+ # The name of the operation's parent resource.
172
+ # @param [Fixnum] page_size
173
+ # The standard list page size.
174
+ # @param [String] page_token
175
+ # The standard list page token.
176
+ # @param [String] fields
177
+ # Selector specifying which fields to include in a partial response.
178
+ # @param [String] quota_user
179
+ # Available to use for quota purposes for server-side applications. Can be any
180
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
181
+ # @param [Google::Apis::RequestOptions] options
182
+ # Request-specific options
183
+ #
184
+ # @yield [result, err] Result & error if block supplied
185
+ # @yieldparam result [Google::Apis::ServiceusageV1::ListOperationsResponse] parsed result object
186
+ # @yieldparam err [StandardError] error object if request failed
187
+ #
188
+ # @return [Google::Apis::ServiceusageV1::ListOperationsResponse]
189
+ #
190
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
191
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
192
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
193
+ def list_operations(filter: nil, name: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
194
+ command = make_simple_command(:get, 'v1/operations', options)
195
+ command.response_representation = Google::Apis::ServiceusageV1::ListOperationsResponse::Representation
196
+ command.response_class = Google::Apis::ServiceusageV1::ListOperationsResponse
197
+ command.query['filter'] = filter unless filter.nil?
198
+ command.query['name'] = name unless name.nil?
199
+ command.query['pageSize'] = page_size unless page_size.nil?
200
+ command.query['pageToken'] = page_token unless page_token.nil?
201
+ command.query['fields'] = fields unless fields.nil?
202
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
203
+ execute_or_queue_command(command, &block)
204
+ end
205
+
206
+ # Enable multiple services on a project. The operation is atomic: if enabling
207
+ # any service fails, then the entire batch fails, and no state changes occur.
208
+ # Operation<response: BatchEnableServicesResponse>
209
+ # @param [String] parent
210
+ # Parent to enable services on.
211
+ # An example name would be:
212
+ # `projects/123`
213
+ # where `123` is the project number (not project ID).
214
+ # The `BatchEnableServices` method currently only supports projects.
215
+ # @param [Google::Apis::ServiceusageV1::BatchEnableServicesRequest] batch_enable_services_request_object
216
+ # @param [String] fields
217
+ # Selector specifying which fields to include in a partial response.
218
+ # @param [String] quota_user
219
+ # Available to use for quota purposes for server-side applications. Can be any
220
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
221
+ # @param [Google::Apis::RequestOptions] options
222
+ # Request-specific options
223
+ #
224
+ # @yield [result, err] Result & error if block supplied
225
+ # @yieldparam result [Google::Apis::ServiceusageV1::Operation] parsed result object
226
+ # @yieldparam err [StandardError] error object if request failed
227
+ #
228
+ # @return [Google::Apis::ServiceusageV1::Operation]
229
+ #
230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
233
+ def batch_enable_services(parent, batch_enable_services_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
234
+ command = make_simple_command(:post, 'v1/{+parent}/services:batchEnable', options)
235
+ command.request_representation = Google::Apis::ServiceusageV1::BatchEnableServicesRequest::Representation
236
+ command.request_object = batch_enable_services_request_object
237
+ command.response_representation = Google::Apis::ServiceusageV1::Operation::Representation
238
+ command.response_class = Google::Apis::ServiceusageV1::Operation
239
+ command.params['parent'] = parent unless parent.nil?
240
+ command.query['fields'] = fields unless fields.nil?
241
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
242
+ execute_or_queue_command(command, &block)
243
+ end
244
+
245
+ # Disable a service so that it can no longer be used with a project.
246
+ # This prevents unintended usage that may cause unexpected billing
247
+ # charges or security leaks.
248
+ # It is not valid to call the disable method on a service that is not
249
+ # currently enabled. Callers will receive a `FAILED_PRECONDITION` status if
250
+ # the target service is not currently enabled.
251
+ # Operation<response: DisableServiceResponse>
252
+ # @param [String] name
253
+ # Name of the consumer and service to disable the service on.
254
+ # The enable and disable methods currently only support projects.
255
+ # An example name would be:
256
+ # `projects/123/services/serviceusage.googleapis.com`
257
+ # where `123` is the project number (not project ID).
258
+ # @param [Google::Apis::ServiceusageV1::DisableServiceRequest] disable_service_request_object
259
+ # @param [String] fields
260
+ # Selector specifying which fields to include in a partial response.
261
+ # @param [String] quota_user
262
+ # Available to use for quota purposes for server-side applications. Can be any
263
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
264
+ # @param [Google::Apis::RequestOptions] options
265
+ # Request-specific options
266
+ #
267
+ # @yield [result, err] Result & error if block supplied
268
+ # @yieldparam result [Google::Apis::ServiceusageV1::Operation] parsed result object
269
+ # @yieldparam err [StandardError] error object if request failed
270
+ #
271
+ # @return [Google::Apis::ServiceusageV1::Operation]
272
+ #
273
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
274
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
275
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
276
+ def disable_service(name, disable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
277
+ command = make_simple_command(:post, 'v1/{+name}:disable', options)
278
+ command.request_representation = Google::Apis::ServiceusageV1::DisableServiceRequest::Representation
279
+ command.request_object = disable_service_request_object
280
+ command.response_representation = Google::Apis::ServiceusageV1::Operation::Representation
281
+ command.response_class = Google::Apis::ServiceusageV1::Operation
282
+ command.params['name'] = name unless name.nil?
283
+ command.query['fields'] = fields unless fields.nil?
284
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
285
+ execute_or_queue_command(command, &block)
286
+ end
287
+
288
+ # Enable a service so that it can be used with a project.
289
+ # Operation<response: EnableServiceResponse>
290
+ # @param [String] name
291
+ # Name of the consumer and service to enable the service on.
292
+ # The `EnableService` and `DisableService` methods currently only support
293
+ # projects.
294
+ # Enabling a service requires that the service is public or is shared with
295
+ # the user enabling the service.
296
+ # An example name would be:
297
+ # `projects/123/services/serviceusage.googleapis.com`
298
+ # where `123` is the project number (not project ID).
299
+ # @param [Google::Apis::ServiceusageV1::EnableServiceRequest] enable_service_request_object
300
+ # @param [String] fields
301
+ # Selector specifying which fields to include in a partial response.
302
+ # @param [String] quota_user
303
+ # Available to use for quota purposes for server-side applications. Can be any
304
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
305
+ # @param [Google::Apis::RequestOptions] options
306
+ # Request-specific options
307
+ #
308
+ # @yield [result, err] Result & error if block supplied
309
+ # @yieldparam result [Google::Apis::ServiceusageV1::Operation] parsed result object
310
+ # @yieldparam err [StandardError] error object if request failed
311
+ #
312
+ # @return [Google::Apis::ServiceusageV1::Operation]
313
+ #
314
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
315
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
316
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
317
+ def enable_service(name, enable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
318
+ command = make_simple_command(:post, 'v1/{+name}:enable', options)
319
+ command.request_representation = Google::Apis::ServiceusageV1::EnableServiceRequest::Representation
320
+ command.request_object = enable_service_request_object
321
+ command.response_representation = Google::Apis::ServiceusageV1::Operation::Representation
322
+ command.response_class = Google::Apis::ServiceusageV1::Operation
323
+ command.params['name'] = name unless name.nil?
324
+ command.query['fields'] = fields unless fields.nil?
325
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
326
+ execute_or_queue_command(command, &block)
327
+ end
328
+
329
+ # Returns the service configuration and enabled state for a given service.
330
+ # @param [String] name
331
+ # Name of the consumer and service to get the `ConsumerState` for.
332
+ # An example name would be:
333
+ # `projects/123/services/serviceusage.googleapis.com`
334
+ # where `123` is the project number (not project ID).
335
+ # @param [String] fields
336
+ # Selector specifying which fields to include in a partial response.
337
+ # @param [String] quota_user
338
+ # Available to use for quota purposes for server-side applications. Can be any
339
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
340
+ # @param [Google::Apis::RequestOptions] options
341
+ # Request-specific options
342
+ #
343
+ # @yield [result, err] Result & error if block supplied
344
+ # @yieldparam result [Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service] parsed result object
345
+ # @yieldparam err [StandardError] error object if request failed
346
+ #
347
+ # @return [Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service]
348
+ #
349
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
350
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
351
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
352
+ def get_service(name, fields: nil, quota_user: nil, options: nil, &block)
353
+ command = make_simple_command(:get, 'v1/{+name}', options)
354
+ command.response_representation = Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service::Representation
355
+ command.response_class = Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service
356
+ command.params['name'] = name unless name.nil?
357
+ command.query['fields'] = fields unless fields.nil?
358
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
359
+ execute_or_queue_command(command, &block)
360
+ end
361
+
362
+ # List all services available to the specified project, and the current
363
+ # state of those services with respect to the project. The list includes
364
+ # all public services, all services for which the calling user has the
365
+ # `servicemanagement.services.bind` permission, and all services that have
366
+ # already been enabled on the project. The list can be filtered to
367
+ # only include services in a specific state, for example to only include
368
+ # services enabled on the project.
369
+ # @param [String] parent
370
+ # Parent to search for services on.
371
+ # An example name would be:
372
+ # `projects/123`
373
+ # where `123` is the project number (not project ID).
374
+ # @param [String] filter
375
+ # Only list services that conform to the given filter.
376
+ # The allowed filter strings are `state:ENABLED` and `state:DISABLED`.
377
+ # @param [Fixnum] page_size
378
+ # Requested size of the next page of data.
379
+ # Requested page size cannot exceed 200.
380
+ # If not set, the default page size is 50.
381
+ # @param [String] page_token
382
+ # Token identifying which result to start with, which is returned by a
383
+ # previous list call.
384
+ # @param [String] fields
385
+ # Selector specifying which fields to include in a partial response.
386
+ # @param [String] quota_user
387
+ # Available to use for quota purposes for server-side applications. Can be any
388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
389
+ # @param [Google::Apis::RequestOptions] options
390
+ # Request-specific options
391
+ #
392
+ # @yield [result, err] Result & error if block supplied
393
+ # @yieldparam result [Google::Apis::ServiceusageV1::ListServicesResponse] parsed result object
394
+ # @yieldparam err [StandardError] error object if request failed
395
+ #
396
+ # @return [Google::Apis::ServiceusageV1::ListServicesResponse]
397
+ #
398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
401
+ def list_services(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
402
+ command = make_simple_command(:get, 'v1/{+parent}/services', options)
403
+ command.response_representation = Google::Apis::ServiceusageV1::ListServicesResponse::Representation
404
+ command.response_class = Google::Apis::ServiceusageV1::ListServicesResponse
405
+ command.params['parent'] = parent unless parent.nil?
406
+ command.query['filter'] = filter unless filter.nil?
407
+ command.query['pageSize'] = page_size unless page_size.nil?
408
+ command.query['pageToken'] = page_token unless page_token.nil?
409
+ command.query['fields'] = fields unless fields.nil?
410
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
411
+ execute_or_queue_command(command, &block)
412
+ end
413
+
414
+ protected
415
+
416
+ def apply_command_defaults(command)
417
+ command.query['key'] = key unless key.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ end
420
+ end
421
+ end
422
+ end
423
+ end
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/service-usage/
28
28
  module ServiceusageV1beta1
29
29
  VERSION = 'V1beta1'
30
- REVISION = '20180520'
30
+ REVISION = '20180630'
31
31
 
32
32
  # View and manage your data across Google Cloud Platform services
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -946,7 +946,26 @@ module Google
946
946
  end
947
947
  end
948
948
 
949
- #
949
+ # A generic empty message that you can re-use to avoid defining duplicated
950
+ # empty messages in your APIs. A typical example is to use it as the request
951
+ # or the response type of an API method. For instance:
952
+ # service Foo `
953
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
954
+ # `
955
+ # The JSON representation for `Empty` is empty JSON object ````.
956
+ class Empty
957
+ include Google::Apis::Core::Hashable
958
+
959
+ def initialize(**args)
960
+ update!(**args)
961
+ end
962
+
963
+ # Update properties of this object
964
+ def update!(**args)
965
+ end
966
+ end
967
+
968
+ # Provides error messages for the failing services.
950
969
  class EnableFailure
951
970
  include Google::Apis::Core::Hashable
952
971
 
@@ -1699,6 +1718,26 @@ module Google
1699
1718
  end
1700
1719
  end
1701
1720
 
1721
+ # The operation metadata returned for the batchend services operation.
1722
+ class GoogleApiServiceusageV1OperationMetadata
1723
+ include Google::Apis::Core::Hashable
1724
+
1725
+ # The full name of the resources that this operation is directly
1726
+ # associated with.
1727
+ # Corresponds to the JSON property `resourceNames`
1728
+ # @return [Array<String>]
1729
+ attr_accessor :resource_names
1730
+
1731
+ def initialize(**args)
1732
+ update!(**args)
1733
+ end
1734
+
1735
+ # Update properties of this object
1736
+ def update!(**args)
1737
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
1738
+ end
1739
+ end
1740
+
1702
1741
  # A service that is available for use by the consumer.
1703
1742
  class GoogleApiServiceusageV1Service
1704
1743
  include Google::Apis::Core::Hashable
@@ -1903,6 +1942,26 @@ module Google
1903
1942
  end
1904
1943
  end
1905
1944
 
1945
+ # The operation metadata returned for the batchend services operation.
1946
+ class GoogleApiServiceusageV1beta1OperationMetadata
1947
+ include Google::Apis::Core::Hashable
1948
+
1949
+ # The full name of the resources that this operation is directly
1950
+ # associated with.
1951
+ # Corresponds to the JSON property `resourceNames`
1952
+ # @return [Array<String>]
1953
+ attr_accessor :resource_names
1954
+
1955
+ def initialize(**args)
1956
+ update!(**args)
1957
+ end
1958
+
1959
+ # Update properties of this object
1960
+ def update!(**args)
1961
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
1962
+ end
1963
+ end
1964
+
1906
1965
  # Defines the HTTP configuration for an API service. It contains a list of
1907
1966
  # HttpRule, each specifying the mapping of an RPC method
1908
1967
  # to one or more HTTP REST API methods.
@@ -2692,6 +2751,11 @@ module Google
2692
2751
  # @return [Array<Google::Apis::ServiceusageV1beta1::LabelDescriptor>]
2693
2752
  attr_accessor :labels
2694
2753
 
2754
+ # Additional annotations that can be used to guide the usage of a metric.
2755
+ # Corresponds to the JSON property `metadata`
2756
+ # @return [Google::Apis::ServiceusageV1beta1::MetricDescriptorMetadata]
2757
+ attr_accessor :metadata
2758
+
2695
2759
  # Whether the metric records instantaneous values, changes to a value, etc.
2696
2760
  # Some combinations of `metric_kind` and `value_type` might not be supported.
2697
2761
  # Corresponds to the JSON property `metricKind`
@@ -2784,6 +2848,7 @@ module Google
2784
2848
  @description = args[:description] if args.key?(:description)
2785
2849
  @display_name = args[:display_name] if args.key?(:display_name)
2786
2850
  @labels = args[:labels] if args.key?(:labels)
2851
+ @metadata = args[:metadata] if args.key?(:metadata)
2787
2852
  @metric_kind = args[:metric_kind] if args.key?(:metric_kind)
2788
2853
  @name = args[:name] if args.key?(:name)
2789
2854
  @type = args[:type] if args.key?(:type)
@@ -2792,6 +2857,42 @@ module Google
2792
2857
  end
2793
2858
  end
2794
2859
 
2860
+ # Additional annotations that can be used to guide the usage of a metric.
2861
+ class MetricDescriptorMetadata
2862
+ include Google::Apis::Core::Hashable
2863
+
2864
+ # The delay of data points caused by ingestion. Data points older than this
2865
+ # age are guaranteed to be ingested and available to be read, excluding
2866
+ # data loss due to errors.
2867
+ # Corresponds to the JSON property `ingestDelay`
2868
+ # @return [String]
2869
+ attr_accessor :ingest_delay
2870
+
2871
+ # The launch stage of the metric definition.
2872
+ # Corresponds to the JSON property `launchStage`
2873
+ # @return [String]
2874
+ attr_accessor :launch_stage
2875
+
2876
+ # The sampling period of metric data points. For metrics which are written
2877
+ # periodically, consecutive data points are stored at this time interval,
2878
+ # excluding data loss due to errors. Metrics with a higher granularity have
2879
+ # a smaller sampling period.
2880
+ # Corresponds to the JSON property `samplePeriod`
2881
+ # @return [String]
2882
+ attr_accessor :sample_period
2883
+
2884
+ def initialize(**args)
2885
+ update!(**args)
2886
+ end
2887
+
2888
+ # Update properties of this object
2889
+ def update!(**args)
2890
+ @ingest_delay = args[:ingest_delay] if args.key?(:ingest_delay)
2891
+ @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
2892
+ @sample_period = args[:sample_period] if args.key?(:sample_period)
2893
+ end
2894
+ end
2895
+
2795
2896
  # Bind API methods to metrics. Binding a method to a metric causes that
2796
2897
  # metric's configured quota behaviors to apply to the method call.
2797
2898
  class MetricRule