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
@@ -46,6 +46,12 @@ module Google
46
46
  include Google::Apis::Core::JsonObjectSupport
47
47
  end
48
48
 
49
+ class Auth
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
49
55
  class AuthenticationInfo
50
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
57
 
@@ -214,18 +220,36 @@ module Google
214
220
  include Google::Apis::Core::JsonObjectSupport
215
221
  end
216
222
 
223
+ class Request
224
+ class Representation < Google::Apis::Core::JsonRepresentation; end
225
+
226
+ include Google::Apis::Core::JsonObjectSupport
227
+ end
228
+
217
229
  class RequestMetadata
218
230
  class Representation < Google::Apis::Core::JsonRepresentation; end
219
231
 
220
232
  include Google::Apis::Core::JsonObjectSupport
221
233
  end
222
234
 
235
+ class Resource
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
223
241
  class ResourceInfo
224
242
  class Representation < Google::Apis::Core::JsonRepresentation; end
225
243
 
226
244
  include Google::Apis::Core::JsonObjectSupport
227
245
  end
228
246
 
247
+ class ResourceLocation
248
+ class Representation < Google::Apis::Core::JsonRepresentation; end
249
+
250
+ include Google::Apis::Core::JsonObjectSupport
251
+ end
252
+
229
253
  class StartReconciliationRequest
230
254
  class Representation < Google::Apis::Core::JsonRepresentation; end
231
255
 
@@ -287,6 +311,8 @@ module Google
287
311
  hash :request, as: 'request'
288
312
  property :request_metadata, as: 'requestMetadata', class: Google::Apis::ServicecontrolV1::RequestMetadata, decorator: Google::Apis::ServicecontrolV1::RequestMetadata::Representation
289
313
 
314
+ property :resource_location, as: 'resourceLocation', class: Google::Apis::ServicecontrolV1::ResourceLocation, decorator: Google::Apis::ServicecontrolV1::ResourceLocation::Representation
315
+
290
316
  property :resource_name, as: 'resourceName'
291
317
  hash :response, as: 'response'
292
318
  hash :service_data, as: 'serviceData'
@@ -296,6 +322,17 @@ module Google
296
322
  end
297
323
  end
298
324
 
325
+ class Auth
326
+ # @private
327
+ class Representation < Google::Apis::Core::JsonRepresentation
328
+ collection :access_levels, as: 'accessLevels'
329
+ collection :audiences, as: 'audiences'
330
+ hash :claims, as: 'claims'
331
+ property :presenter, as: 'presenter'
332
+ property :principal, as: 'principal'
333
+ end
334
+ end
335
+
299
336
  class AuthenticationInfo
300
337
  # @private
301
338
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -311,6 +348,8 @@ module Google
311
348
  property :granted, as: 'granted'
312
349
  property :permission, as: 'permission'
313
350
  property :resource, as: 'resource'
351
+ property :resource_attributes, as: 'resourceAttributes', class: Google::Apis::ServicecontrolV1::Resource, decorator: Google::Apis::ServicecontrolV1::Resource::Representation
352
+
314
353
  end
315
354
  end
316
355
 
@@ -598,12 +637,44 @@ module Google
598
637
  end
599
638
  end
600
639
 
640
+ class Request
641
+ # @private
642
+ class Representation < Google::Apis::Core::JsonRepresentation
643
+ property :auth, as: 'auth', class: Google::Apis::ServicecontrolV1::Auth, decorator: Google::Apis::ServicecontrolV1::Auth::Representation
644
+
645
+ property :fragment, as: 'fragment'
646
+ hash :headers, as: 'headers'
647
+ property :host, as: 'host'
648
+ property :id, as: 'id'
649
+ property :method_prop, as: 'method'
650
+ property :path, as: 'path'
651
+ property :protocol, as: 'protocol'
652
+ property :query, as: 'query'
653
+ property :reason, as: 'reason'
654
+ property :scheme, as: 'scheme'
655
+ property :size, :numeric_string => true, as: 'size'
656
+ property :time, as: 'time'
657
+ end
658
+ end
659
+
601
660
  class RequestMetadata
602
661
  # @private
603
662
  class Representation < Google::Apis::Core::JsonRepresentation
604
663
  property :caller_ip, as: 'callerIp'
605
664
  property :caller_network, as: 'callerNetwork'
606
665
  property :caller_supplied_user_agent, as: 'callerSuppliedUserAgent'
666
+ property :request_attributes, as: 'requestAttributes', class: Google::Apis::ServicecontrolV1::Request, decorator: Google::Apis::ServicecontrolV1::Request::Representation
667
+
668
+ end
669
+ end
670
+
671
+ class Resource
672
+ # @private
673
+ class Representation < Google::Apis::Core::JsonRepresentation
674
+ hash :labels, as: 'labels'
675
+ property :name, as: 'name'
676
+ property :service, as: 'service'
677
+ property :type, as: 'type'
607
678
  end
608
679
  end
609
680
 
@@ -615,6 +686,13 @@ module Google
615
686
  end
616
687
  end
617
688
 
689
+ class ResourceLocation
690
+ # @private
691
+ class Representation < Google::Apis::Core::JsonRepresentation
692
+ collection :current_locations, as: 'currentLocations'
693
+ end
694
+ end
695
+
618
696
  class StartReconciliationRequest
619
697
  # @private
620
698
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/service-management/
28
28
  module ServicemanagementV1
29
29
  VERSION = 'V1'
30
- REVISION = '20180525'
30
+ REVISION = '20180622'
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'
@@ -2397,6 +2397,11 @@ module Google
2397
2397
  # @return [Array<Google::Apis::ServicemanagementV1::LabelDescriptor>]
2398
2398
  attr_accessor :labels
2399
2399
 
2400
+ # Additional annotations that can be used to guide the usage of a metric.
2401
+ # Corresponds to the JSON property `metadata`
2402
+ # @return [Google::Apis::ServicemanagementV1::MetricDescriptorMetadata]
2403
+ attr_accessor :metadata
2404
+
2400
2405
  # Whether the metric records instantaneous values, changes to a value, etc.
2401
2406
  # Some combinations of `metric_kind` and `value_type` might not be supported.
2402
2407
  # Corresponds to the JSON property `metricKind`
@@ -2489,6 +2494,7 @@ module Google
2489
2494
  @description = args[:description] if args.key?(:description)
2490
2495
  @display_name = args[:display_name] if args.key?(:display_name)
2491
2496
  @labels = args[:labels] if args.key?(:labels)
2497
+ @metadata = args[:metadata] if args.key?(:metadata)
2492
2498
  @metric_kind = args[:metric_kind] if args.key?(:metric_kind)
2493
2499
  @name = args[:name] if args.key?(:name)
2494
2500
  @type = args[:type] if args.key?(:type)
@@ -2497,6 +2503,42 @@ module Google
2497
2503
  end
2498
2504
  end
2499
2505
 
2506
+ # Additional annotations that can be used to guide the usage of a metric.
2507
+ class MetricDescriptorMetadata
2508
+ include Google::Apis::Core::Hashable
2509
+
2510
+ # The delay of data points caused by ingestion. Data points older than this
2511
+ # age are guaranteed to be ingested and available to be read, excluding
2512
+ # data loss due to errors.
2513
+ # Corresponds to the JSON property `ingestDelay`
2514
+ # @return [String]
2515
+ attr_accessor :ingest_delay
2516
+
2517
+ # The launch stage of the metric definition.
2518
+ # Corresponds to the JSON property `launchStage`
2519
+ # @return [String]
2520
+ attr_accessor :launch_stage
2521
+
2522
+ # The sampling period of metric data points. For metrics which are written
2523
+ # periodically, consecutive data points are stored at this time interval,
2524
+ # excluding data loss due to errors. Metrics with a higher granularity have
2525
+ # a smaller sampling period.
2526
+ # Corresponds to the JSON property `samplePeriod`
2527
+ # @return [String]
2528
+ attr_accessor :sample_period
2529
+
2530
+ def initialize(**args)
2531
+ update!(**args)
2532
+ end
2533
+
2534
+ # Update properties of this object
2535
+ def update!(**args)
2536
+ @ingest_delay = args[:ingest_delay] if args.key?(:ingest_delay)
2537
+ @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
2538
+ @sample_period = args[:sample_period] if args.key?(:sample_period)
2539
+ end
2540
+ end
2541
+
2500
2542
  # Bind API methods to metrics. Binding a method to a metric causes that
2501
2543
  # metric's configured quota behaviors to apply to the method call.
2502
2544
  class MetricRule
@@ -346,6 +346,12 @@ module Google
346
346
  include Google::Apis::Core::JsonObjectSupport
347
347
  end
348
348
 
349
+ class MetricDescriptorMetadata
350
+ class Representation < Google::Apis::Core::JsonRepresentation; end
351
+
352
+ include Google::Apis::Core::JsonObjectSupport
353
+ end
354
+
349
355
  class MetricRule
350
356
  class Representation < Google::Apis::Core::JsonRepresentation; end
351
357
 
@@ -1061,6 +1067,8 @@ module Google
1061
1067
  property :display_name, as: 'displayName'
1062
1068
  collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation
1063
1069
 
1070
+ property :metadata, as: 'metadata', class: Google::Apis::ServicemanagementV1::MetricDescriptorMetadata, decorator: Google::Apis::ServicemanagementV1::MetricDescriptorMetadata::Representation
1071
+
1064
1072
  property :metric_kind, as: 'metricKind'
1065
1073
  property :name, as: 'name'
1066
1074
  property :type, as: 'type'
@@ -1069,6 +1077,15 @@ module Google
1069
1077
  end
1070
1078
  end
1071
1079
 
1080
+ class MetricDescriptorMetadata
1081
+ # @private
1082
+ class Representation < Google::Apis::Core::JsonRepresentation
1083
+ property :ingest_delay, as: 'ingestDelay'
1084
+ property :launch_stage, as: 'launchStage'
1085
+ property :sample_period, as: 'samplePeriod'
1086
+ end
1087
+ end
1088
+
1072
1089
  class MetricRule
1073
1090
  # @private
1074
1091
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -12,21 +12,22 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'google/apis/replicapool_v1beta2/service.rb'
16
- require 'google/apis/replicapool_v1beta2/classes.rb'
17
- require 'google/apis/replicapool_v1beta2/representations.rb'
15
+ require 'google/apis/serviceusage_v1/service.rb'
16
+ require 'google/apis/serviceusage_v1/classes.rb'
17
+ require 'google/apis/serviceusage_v1/representations.rb'
18
18
 
19
19
  module Google
20
20
  module Apis
21
- # Google Compute Engine Instance Group Manager API
21
+ # Service Usage API
22
22
  #
23
- # [Deprecated. Please use Instance Group Manager in Compute API] Provides groups
24
- # of homogenous Compute Engine instances.
23
+ # Enables services that service consumers want to use on Google Cloud Platform,
24
+ # lists the available or enabled services, or disables services that service
25
+ # consumers no longer use.
25
26
  #
26
- # @see https://developers.google.com/compute/docs/instance-groups/manager/v1beta2
27
- module ReplicapoolV1beta2
28
- VERSION = 'V1beta2'
29
- REVISION = '20160512'
27
+ # @see https://cloud.google.com/service-usage/
28
+ module ServiceusageV1
29
+ VERSION = 'V1'
30
+ REVISION = '20180630'
30
31
 
31
32
  # View and manage your data across Google Cloud Platform services
32
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -34,11 +35,8 @@ module Google
34
35
  # View your data across Google Cloud Platform services
35
36
  AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
36
37
 
37
- # View and manage your Google Compute Engine resources
38
- AUTH_COMPUTE = 'https://www.googleapis.com/auth/compute'
39
-
40
- # View your Google Compute Engine resources
41
- AUTH_COMPUTE_READONLY = 'https://www.googleapis.com/auth/compute.readonly'
38
+ # Manage your Google API service configuration
39
+ AUTH_SERVICE_MANAGEMENT = 'https://www.googleapis.com/auth/service.management'
42
40
  end
43
41
  end
44
42
  end
@@ -0,0 +1,4020 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module ServiceusageV1
24
+
25
+ # Api is a light-weight descriptor for an API Interface.
26
+ # Interfaces are also described as "protocol buffer services" in some contexts,
27
+ # such as by the "service" keyword in a .proto file, but they are different
28
+ # from API Services, which represent a concrete implementation of an interface
29
+ # as opposed to simply a description of methods and bindings. They are also
30
+ # sometimes simply referred to as "APIs" in other contexts, such as the name of
31
+ # this message itself. See https://cloud.google.com/apis/design/glossary for
32
+ # detailed terminology.
33
+ class Api
34
+ include Google::Apis::Core::Hashable
35
+
36
+ # The methods of this interface, in unspecified order.
37
+ # Corresponds to the JSON property `methods`
38
+ # @return [Array<Google::Apis::ServiceusageV1::MethodProp>]
39
+ attr_accessor :methods_prop
40
+
41
+ # Included interfaces. See Mixin.
42
+ # Corresponds to the JSON property `mixins`
43
+ # @return [Array<Google::Apis::ServiceusageV1::Mixin>]
44
+ attr_accessor :mixins
45
+
46
+ # The fully qualified name of this interface, including package name
47
+ # followed by the interface's simple name.
48
+ # Corresponds to the JSON property `name`
49
+ # @return [String]
50
+ attr_accessor :name
51
+
52
+ # Any metadata attached to the interface.
53
+ # Corresponds to the JSON property `options`
54
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
55
+ attr_accessor :options
56
+
57
+ # `SourceContext` represents information about the source of a
58
+ # protobuf element, like the file in which it is defined.
59
+ # Corresponds to the JSON property `sourceContext`
60
+ # @return [Google::Apis::ServiceusageV1::SourceContext]
61
+ attr_accessor :source_context
62
+
63
+ # The source syntax of the service.
64
+ # Corresponds to the JSON property `syntax`
65
+ # @return [String]
66
+ attr_accessor :syntax
67
+
68
+ # A version string for this interface. If specified, must have the form
69
+ # `major-version.minor-version`, as in `1.10`. If the minor version is
70
+ # omitted, it defaults to zero. If the entire version field is empty, the
71
+ # major version is derived from the package name, as outlined below. If the
72
+ # field is not empty, the version in the package name will be verified to be
73
+ # consistent with what is provided here.
74
+ # The versioning schema uses [semantic
75
+ # versioning](http://semver.org) where the major version number
76
+ # indicates a breaking change and the minor version an additive,
77
+ # non-breaking change. Both version numbers are signals to users
78
+ # what to expect from different versions, and should be carefully
79
+ # chosen based on the product plan.
80
+ # The major version is also reflected in the package name of the
81
+ # interface, which must end in `v<major-version>`, as in
82
+ # `google.feature.v1`. For major versions 0 and 1, the suffix can
83
+ # be omitted. Zero major versions must only be used for
84
+ # experimental, non-GA interfaces.
85
+ # Corresponds to the JSON property `version`
86
+ # @return [String]
87
+ attr_accessor :version
88
+
89
+ def initialize(**args)
90
+ update!(**args)
91
+ end
92
+
93
+ # Update properties of this object
94
+ def update!(**args)
95
+ @methods_prop = args[:methods_prop] if args.key?(:methods_prop)
96
+ @mixins = args[:mixins] if args.key?(:mixins)
97
+ @name = args[:name] if args.key?(:name)
98
+ @options = args[:options] if args.key?(:options)
99
+ @source_context = args[:source_context] if args.key?(:source_context)
100
+ @syntax = args[:syntax] if args.key?(:syntax)
101
+ @version = args[:version] if args.key?(:version)
102
+ end
103
+ end
104
+
105
+ # Configuration for an anthentication provider, including support for
106
+ # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
107
+ # token-32).
108
+ class AuthProvider
109
+ include Google::Apis::Core::Hashable
110
+
111
+ # The list of JWT
112
+ # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#
113
+ # section-4.1.3).
114
+ # that are allowed to access. A JWT containing any of these audiences will
115
+ # be accepted. When this setting is absent, only JWTs with audience
116
+ # "https://Service_name/API_name"
117
+ # will be accepted. For example, if no audiences are in the setting,
118
+ # LibraryService API will only accept JWTs with the following audience
119
+ # "https://library-example.googleapis.com/google.example.library.v1.
120
+ # LibraryService".
121
+ # Example:
122
+ # audiences: bookstore_android.apps.googleusercontent.com,
123
+ # bookstore_web.apps.googleusercontent.com
124
+ # Corresponds to the JSON property `audiences`
125
+ # @return [String]
126
+ attr_accessor :audiences
127
+
128
+ # Redirect URL if JWT token is required but no present or is expired.
129
+ # Implement authorizationUrl of securityDefinitions in OpenAPI spec.
130
+ # Corresponds to the JSON property `authorizationUrl`
131
+ # @return [String]
132
+ attr_accessor :authorization_url
133
+
134
+ # The unique identifier of the auth provider. It will be referred to by
135
+ # `AuthRequirement.provider_id`.
136
+ # Example: "bookstore_auth".
137
+ # Corresponds to the JSON property `id`
138
+ # @return [String]
139
+ attr_accessor :id
140
+
141
+ # Identifies the principal that issued the JWT. See
142
+ # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
143
+ # Usually a URL or an email address.
144
+ # Example: https://securetoken.google.com
145
+ # Example: 1234567-compute@developer.gserviceaccount.com
146
+ # Corresponds to the JSON property `issuer`
147
+ # @return [String]
148
+ attr_accessor :issuer
149
+
150
+ # URL of the provider's public key set to validate signature of the JWT. See
151
+ # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#
152
+ # ProviderMetadata).
153
+ # Optional if the key set document:
154
+ # - can be retrieved from
155
+ # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.
156
+ # html
157
+ # of the issuer.
158
+ # - can be inferred from the email domain of the issuer (e.g. a Google service
159
+ # account).
160
+ # Example: https://www.googleapis.com/oauth2/v1/certs
161
+ # Corresponds to the JSON property `jwksUri`
162
+ # @return [String]
163
+ attr_accessor :jwks_uri
164
+
165
+ def initialize(**args)
166
+ update!(**args)
167
+ end
168
+
169
+ # Update properties of this object
170
+ def update!(**args)
171
+ @audiences = args[:audiences] if args.key?(:audiences)
172
+ @authorization_url = args[:authorization_url] if args.key?(:authorization_url)
173
+ @id = args[:id] if args.key?(:id)
174
+ @issuer = args[:issuer] if args.key?(:issuer)
175
+ @jwks_uri = args[:jwks_uri] if args.key?(:jwks_uri)
176
+ end
177
+ end
178
+
179
+ # User-defined authentication requirements, including support for
180
+ # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
181
+ # token-32).
182
+ class AuthRequirement
183
+ include Google::Apis::Core::Hashable
184
+
185
+ # NOTE: This will be deprecated soon, once AuthProvider.audiences is
186
+ # implemented and accepted in all the runtime components.
187
+ # The list of JWT
188
+ # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#
189
+ # section-4.1.3).
190
+ # that are allowed to access. A JWT containing any of these audiences will
191
+ # be accepted. When this setting is absent, only JWTs with audience
192
+ # "https://Service_name/API_name"
193
+ # will be accepted. For example, if no audiences are in the setting,
194
+ # LibraryService API will only accept JWTs with the following audience
195
+ # "https://library-example.googleapis.com/google.example.library.v1.
196
+ # LibraryService".
197
+ # Example:
198
+ # audiences: bookstore_android.apps.googleusercontent.com,
199
+ # bookstore_web.apps.googleusercontent.com
200
+ # Corresponds to the JSON property `audiences`
201
+ # @return [String]
202
+ attr_accessor :audiences
203
+
204
+ # id from authentication provider.
205
+ # Example:
206
+ # provider_id: bookstore_auth
207
+ # Corresponds to the JSON property `providerId`
208
+ # @return [String]
209
+ attr_accessor :provider_id
210
+
211
+ def initialize(**args)
212
+ update!(**args)
213
+ end
214
+
215
+ # Update properties of this object
216
+ def update!(**args)
217
+ @audiences = args[:audiences] if args.key?(:audiences)
218
+ @provider_id = args[:provider_id] if args.key?(:provider_id)
219
+ end
220
+ end
221
+
222
+ # `Authentication` defines the authentication configuration for an API.
223
+ # Example for an API targeted for external use:
224
+ # name: calendar.googleapis.com
225
+ # authentication:
226
+ # providers:
227
+ # - id: google_calendar_auth
228
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
229
+ # issuer: https://securetoken.google.com
230
+ # rules:
231
+ # - selector: "*"
232
+ # requirements:
233
+ # provider_id: google_calendar_auth
234
+ class Authentication
235
+ include Google::Apis::Core::Hashable
236
+
237
+ # Defines a set of authentication providers that a service supports.
238
+ # Corresponds to the JSON property `providers`
239
+ # @return [Array<Google::Apis::ServiceusageV1::AuthProvider>]
240
+ attr_accessor :providers
241
+
242
+ # A list of authentication rules that apply to individual API methods.
243
+ # **NOTE:** All service configuration rules follow "last one wins" order.
244
+ # Corresponds to the JSON property `rules`
245
+ # @return [Array<Google::Apis::ServiceusageV1::AuthenticationRule>]
246
+ attr_accessor :rules
247
+
248
+ def initialize(**args)
249
+ update!(**args)
250
+ end
251
+
252
+ # Update properties of this object
253
+ def update!(**args)
254
+ @providers = args[:providers] if args.key?(:providers)
255
+ @rules = args[:rules] if args.key?(:rules)
256
+ end
257
+ end
258
+
259
+ # Authentication rules for the service.
260
+ # By default, if a method has any authentication requirements, every request
261
+ # must include a valid credential matching one of the requirements.
262
+ # It's an error to include more than one kind of credential in a single
263
+ # request.
264
+ # If a method doesn't have any auth requirements, request credentials will be
265
+ # ignored.
266
+ class AuthenticationRule
267
+ include Google::Apis::Core::Hashable
268
+
269
+ # If true, the service accepts API keys without any other credential.
270
+ # Corresponds to the JSON property `allowWithoutCredential`
271
+ # @return [Boolean]
272
+ attr_accessor :allow_without_credential
273
+ alias_method :allow_without_credential?, :allow_without_credential
274
+
275
+ # OAuth scopes are a way to define data and permissions on data. For example,
276
+ # there are scopes defined for "Read-only access to Google Calendar" and
277
+ # "Access to Cloud Platform". Users can consent to a scope for an application,
278
+ # giving it permission to access that data on their behalf.
279
+ # OAuth scope specifications should be fairly coarse grained; a user will need
280
+ # to see and understand the text description of what your scope means.
281
+ # In most cases: use one or at most two OAuth scopes for an entire family of
282
+ # products. If your product has multiple APIs, you should probably be sharing
283
+ # the OAuth scope across all of those APIs.
284
+ # When you need finer grained OAuth consent screens: talk with your product
285
+ # management about how developers will use them in practice.
286
+ # Please note that even though each of the canonical scopes is enough for a
287
+ # request to be accepted and passed to the backend, a request can still fail
288
+ # due to the backend requiring additional scopes or permissions.
289
+ # Corresponds to the JSON property `oauth`
290
+ # @return [Google::Apis::ServiceusageV1::OAuthRequirements]
291
+ attr_accessor :oauth
292
+
293
+ # Requirements for additional authentication providers.
294
+ # Corresponds to the JSON property `requirements`
295
+ # @return [Array<Google::Apis::ServiceusageV1::AuthRequirement>]
296
+ attr_accessor :requirements
297
+
298
+ # Selects the methods to which this rule applies.
299
+ # Refer to selector for syntax details.
300
+ # Corresponds to the JSON property `selector`
301
+ # @return [String]
302
+ attr_accessor :selector
303
+
304
+ def initialize(**args)
305
+ update!(**args)
306
+ end
307
+
308
+ # Update properties of this object
309
+ def update!(**args)
310
+ @allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential)
311
+ @oauth = args[:oauth] if args.key?(:oauth)
312
+ @requirements = args[:requirements] if args.key?(:requirements)
313
+ @selector = args[:selector] if args.key?(:selector)
314
+ end
315
+ end
316
+
317
+ # Configuration of authorization.
318
+ # This section determines the authorization provider, if unspecified, then no
319
+ # authorization check will be done.
320
+ # Example:
321
+ # experimental:
322
+ # authorization:
323
+ # provider: firebaserules.googleapis.com
324
+ class AuthorizationConfig
325
+ include Google::Apis::Core::Hashable
326
+
327
+ # The name of the authorization provider, such as
328
+ # firebaserules.googleapis.com.
329
+ # Corresponds to the JSON property `provider`
330
+ # @return [String]
331
+ attr_accessor :provider
332
+
333
+ def initialize(**args)
334
+ update!(**args)
335
+ end
336
+
337
+ # Update properties of this object
338
+ def update!(**args)
339
+ @provider = args[:provider] if args.key?(:provider)
340
+ end
341
+ end
342
+
343
+ # Authorization rule for API services.
344
+ # It specifies the permission(s) required for an API element for the overall
345
+ # API request to succeed. It is typically used to mark request message fields
346
+ # that contain the name of the resource and indicates the permissions that
347
+ # will be checked on that resource.
348
+ # For example:
349
+ # package google.storage.v1;
350
+ # message CopyObjectRequest `
351
+ # string source = 1 [
352
+ # (google.api.authz).permissions = "storage.objects.get"];
353
+ # string destination = 2 [
354
+ # (google.api.authz).permissions =
355
+ # "storage.objects.create,storage.objects.update"];
356
+ # `
357
+ class AuthorizationRule
358
+ include Google::Apis::Core::Hashable
359
+
360
+ # The required permissions. The acceptable values vary depend on the
361
+ # authorization system used. For Google APIs, it should be a comma-separated
362
+ # Google IAM permission values. When multiple permissions are listed, the
363
+ # semantics is not defined by the system. Additional documentation must
364
+ # be provided manually.
365
+ # Corresponds to the JSON property `permissions`
366
+ # @return [String]
367
+ attr_accessor :permissions
368
+
369
+ # Selects the API elements to which this rule applies.
370
+ # Refer to selector for syntax details.
371
+ # Corresponds to the JSON property `selector`
372
+ # @return [String]
373
+ attr_accessor :selector
374
+
375
+ def initialize(**args)
376
+ update!(**args)
377
+ end
378
+
379
+ # Update properties of this object
380
+ def update!(**args)
381
+ @permissions = args[:permissions] if args.key?(:permissions)
382
+ @selector = args[:selector] if args.key?(:selector)
383
+ end
384
+ end
385
+
386
+ # `Backend` defines the backend configuration for a service.
387
+ class Backend
388
+ include Google::Apis::Core::Hashable
389
+
390
+ # A list of API backend rules that apply to individual API methods.
391
+ # **NOTE:** All service configuration rules follow "last one wins" order.
392
+ # Corresponds to the JSON property `rules`
393
+ # @return [Array<Google::Apis::ServiceusageV1::BackendRule>]
394
+ attr_accessor :rules
395
+
396
+ def initialize(**args)
397
+ update!(**args)
398
+ end
399
+
400
+ # Update properties of this object
401
+ def update!(**args)
402
+ @rules = args[:rules] if args.key?(:rules)
403
+ end
404
+ end
405
+
406
+ # A backend rule provides configuration for an individual API element.
407
+ class BackendRule
408
+ include Google::Apis::Core::Hashable
409
+
410
+ # The address of the API backend.
411
+ # Corresponds to the JSON property `address`
412
+ # @return [String]
413
+ attr_accessor :address
414
+
415
+ # The number of seconds to wait for a response from a request. The default
416
+ # deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
417
+ # Corresponds to the JSON property `deadline`
418
+ # @return [Float]
419
+ attr_accessor :deadline
420
+
421
+ # Minimum deadline in seconds needed for this method. Calls having deadline
422
+ # value lower than this will be rejected.
423
+ # Corresponds to the JSON property `minDeadline`
424
+ # @return [Float]
425
+ attr_accessor :min_deadline
426
+
427
+ # Selects the methods to which this rule applies.
428
+ # Refer to selector for syntax details.
429
+ # Corresponds to the JSON property `selector`
430
+ # @return [String]
431
+ attr_accessor :selector
432
+
433
+ def initialize(**args)
434
+ update!(**args)
435
+ end
436
+
437
+ # Update properties of this object
438
+ def update!(**args)
439
+ @address = args[:address] if args.key?(:address)
440
+ @deadline = args[:deadline] if args.key?(:deadline)
441
+ @min_deadline = args[:min_deadline] if args.key?(:min_deadline)
442
+ @selector = args[:selector] if args.key?(:selector)
443
+ end
444
+ end
445
+
446
+ # Request message for the `BatchEnableServices` method.
447
+ class BatchEnableServicesRequest
448
+ include Google::Apis::Core::Hashable
449
+
450
+ # The identifiers of the services to enable on the project.
451
+ # A valid identifier would be:
452
+ # serviceusage.googleapis.com
453
+ # Enabling services requires that each service is public or is shared with
454
+ # the user enabling the service.
455
+ # Two or more services must be specified. To enable a single service,
456
+ # use the `EnableService` method instead.
457
+ # A single request can enable a maximum of 20 services at a time. If more
458
+ # than 20 services are specified, the request will fail, and no state changes
459
+ # will occur.
460
+ # Corresponds to the JSON property `serviceIds`
461
+ # @return [Array<String>]
462
+ attr_accessor :service_ids
463
+
464
+ def initialize(**args)
465
+ update!(**args)
466
+ end
467
+
468
+ # Update properties of this object
469
+ def update!(**args)
470
+ @service_ids = args[:service_ids] if args.key?(:service_ids)
471
+ end
472
+ end
473
+
474
+ # Response message for the `BatchEnableServices` method.
475
+ # This response message is assigned to the `response` field of the returned
476
+ # Operation when that operation is done.
477
+ class BatchEnableServicesResponse
478
+ include Google::Apis::Core::Hashable
479
+
480
+ # If allow_partial_success is true, and one or more services could not be
481
+ # enabled, this field contains the details about each failure.
482
+ # Corresponds to the JSON property `failures`
483
+ # @return [Array<Google::Apis::ServiceusageV1::EnableFailure>]
484
+ attr_accessor :failures
485
+
486
+ # The new state of the services after enabling.
487
+ # Corresponds to the JSON property `services`
488
+ # @return [Array<Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service>]
489
+ attr_accessor :services
490
+
491
+ def initialize(**args)
492
+ update!(**args)
493
+ end
494
+
495
+ # Update properties of this object
496
+ def update!(**args)
497
+ @failures = args[:failures] if args.key?(:failures)
498
+ @services = args[:services] if args.key?(:services)
499
+ end
500
+ end
501
+
502
+ # Billing related configuration of the service.
503
+ # The following example shows how to configure monitored resources and metrics
504
+ # for billing:
505
+ # monitored_resources:
506
+ # - type: library.googleapis.com/branch
507
+ # labels:
508
+ # - key: /city
509
+ # description: The city where the library branch is located in.
510
+ # - key: /name
511
+ # description: The name of the branch.
512
+ # metrics:
513
+ # - name: library.googleapis.com/book/borrowed_count
514
+ # metric_kind: DELTA
515
+ # value_type: INT64
516
+ # billing:
517
+ # consumer_destinations:
518
+ # - monitored_resource: library.googleapis.com/branch
519
+ # metrics:
520
+ # - library.googleapis.com/book/borrowed_count
521
+ class Billing
522
+ include Google::Apis::Core::Hashable
523
+
524
+ # Billing configurations for sending metrics to the consumer project.
525
+ # There can be multiple consumer destinations per service, each one must have
526
+ # a different monitored resource type. A metric can be used in at most
527
+ # one consumer destination.
528
+ # Corresponds to the JSON property `consumerDestinations`
529
+ # @return [Array<Google::Apis::ServiceusageV1::BillingDestination>]
530
+ attr_accessor :consumer_destinations
531
+
532
+ def initialize(**args)
533
+ update!(**args)
534
+ end
535
+
536
+ # Update properties of this object
537
+ def update!(**args)
538
+ @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
539
+ end
540
+ end
541
+
542
+ # Configuration of a specific billing destination (Currently only support
543
+ # bill against consumer project).
544
+ class BillingDestination
545
+ include Google::Apis::Core::Hashable
546
+
547
+ # Names of the metrics to report to this billing destination.
548
+ # Each name must be defined in Service.metrics section.
549
+ # Corresponds to the JSON property `metrics`
550
+ # @return [Array<String>]
551
+ attr_accessor :metrics
552
+
553
+ # The monitored resource type. The type must be defined in
554
+ # Service.monitored_resources section.
555
+ # Corresponds to the JSON property `monitoredResource`
556
+ # @return [String]
557
+ attr_accessor :monitored_resource
558
+
559
+ def initialize(**args)
560
+ update!(**args)
561
+ end
562
+
563
+ # Update properties of this object
564
+ def update!(**args)
565
+ @metrics = args[:metrics] if args.key?(:metrics)
566
+ @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
567
+ end
568
+ end
569
+
570
+ # The request message for Operations.CancelOperation.
571
+ class CancelOperationRequest
572
+ include Google::Apis::Core::Hashable
573
+
574
+ def initialize(**args)
575
+ update!(**args)
576
+ end
577
+
578
+ # Update properties of this object
579
+ def update!(**args)
580
+ end
581
+ end
582
+
583
+ # `Context` defines which contexts an API requests.
584
+ # Example:
585
+ # context:
586
+ # rules:
587
+ # - selector: "*"
588
+ # requested:
589
+ # - google.rpc.context.ProjectContext
590
+ # - google.rpc.context.OriginContext
591
+ # The above specifies that all methods in the API request
592
+ # `google.rpc.context.ProjectContext` and
593
+ # `google.rpc.context.OriginContext`.
594
+ # Available context types are defined in package
595
+ # `google.rpc.context`.
596
+ # This also provides mechanism to whitelist any protobuf message extension that
597
+ # can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
598
+ # “x-goog-ext-<extension_id>-jspb” format. For example, list any service
599
+ # specific protobuf types that can appear in grpc metadata as follows in your
600
+ # yaml file:
601
+ # Example:
602
+ # context:
603
+ # rules:
604
+ # - selector: "google.example.library.v1.LibraryService.CreateBook"
605
+ # allowed_request_extensions:
606
+ # - google.foo.v1.NewExtension
607
+ # allowed_response_extensions:
608
+ # - google.foo.v1.NewExtension
609
+ # You can also specify extension ID instead of fully qualified extension name
610
+ # here.
611
+ class Context
612
+ include Google::Apis::Core::Hashable
613
+
614
+ # A list of RPC context rules that apply to individual API methods.
615
+ # **NOTE:** All service configuration rules follow "last one wins" order.
616
+ # Corresponds to the JSON property `rules`
617
+ # @return [Array<Google::Apis::ServiceusageV1::ContextRule>]
618
+ attr_accessor :rules
619
+
620
+ def initialize(**args)
621
+ update!(**args)
622
+ end
623
+
624
+ # Update properties of this object
625
+ def update!(**args)
626
+ @rules = args[:rules] if args.key?(:rules)
627
+ end
628
+ end
629
+
630
+ # A context rule provides information about the context for an individual API
631
+ # element.
632
+ class ContextRule
633
+ include Google::Apis::Core::Hashable
634
+
635
+ # A list of full type names or extension IDs of extensions allowed in grpc
636
+ # side channel from client to backend.
637
+ # Corresponds to the JSON property `allowedRequestExtensions`
638
+ # @return [Array<String>]
639
+ attr_accessor :allowed_request_extensions
640
+
641
+ # A list of full type names or extension IDs of extensions allowed in grpc
642
+ # side channel from backend to client.
643
+ # Corresponds to the JSON property `allowedResponseExtensions`
644
+ # @return [Array<String>]
645
+ attr_accessor :allowed_response_extensions
646
+
647
+ # A list of full type names of provided contexts.
648
+ # Corresponds to the JSON property `provided`
649
+ # @return [Array<String>]
650
+ attr_accessor :provided
651
+
652
+ # A list of full type names of requested contexts.
653
+ # Corresponds to the JSON property `requested`
654
+ # @return [Array<String>]
655
+ attr_accessor :requested
656
+
657
+ # Selects the methods to which this rule applies.
658
+ # Refer to selector for syntax details.
659
+ # Corresponds to the JSON property `selector`
660
+ # @return [String]
661
+ attr_accessor :selector
662
+
663
+ def initialize(**args)
664
+ update!(**args)
665
+ end
666
+
667
+ # Update properties of this object
668
+ def update!(**args)
669
+ @allowed_request_extensions = args[:allowed_request_extensions] if args.key?(:allowed_request_extensions)
670
+ @allowed_response_extensions = args[:allowed_response_extensions] if args.key?(:allowed_response_extensions)
671
+ @provided = args[:provided] if args.key?(:provided)
672
+ @requested = args[:requested] if args.key?(:requested)
673
+ @selector = args[:selector] if args.key?(:selector)
674
+ end
675
+ end
676
+
677
+ # Selects and configures the service controller used by the service. The
678
+ # service controller handles features like abuse, quota, billing, logging,
679
+ # monitoring, etc.
680
+ class Control
681
+ include Google::Apis::Core::Hashable
682
+
683
+ # The service control environment to use. If empty, no control plane
684
+ # feature (like quota and billing) will be enabled.
685
+ # Corresponds to the JSON property `environment`
686
+ # @return [String]
687
+ attr_accessor :environment
688
+
689
+ def initialize(**args)
690
+ update!(**args)
691
+ end
692
+
693
+ # Update properties of this object
694
+ def update!(**args)
695
+ @environment = args[:environment] if args.key?(:environment)
696
+ end
697
+ end
698
+
699
+ # Customize service error responses. For example, list any service
700
+ # specific protobuf types that can appear in error detail lists of
701
+ # error responses.
702
+ # Example:
703
+ # custom_error:
704
+ # types:
705
+ # - google.foo.v1.CustomError
706
+ # - google.foo.v1.AnotherError
707
+ class CustomError
708
+ include Google::Apis::Core::Hashable
709
+
710
+ # The list of custom error rules that apply to individual API messages.
711
+ # **NOTE:** All service configuration rules follow "last one wins" order.
712
+ # Corresponds to the JSON property `rules`
713
+ # @return [Array<Google::Apis::ServiceusageV1::CustomErrorRule>]
714
+ attr_accessor :rules
715
+
716
+ # The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
717
+ # Corresponds to the JSON property `types`
718
+ # @return [Array<String>]
719
+ attr_accessor :types
720
+
721
+ def initialize(**args)
722
+ update!(**args)
723
+ end
724
+
725
+ # Update properties of this object
726
+ def update!(**args)
727
+ @rules = args[:rules] if args.key?(:rules)
728
+ @types = args[:types] if args.key?(:types)
729
+ end
730
+ end
731
+
732
+ # A custom error rule.
733
+ class CustomErrorRule
734
+ include Google::Apis::Core::Hashable
735
+
736
+ # Mark this message as possible payload in error response. Otherwise,
737
+ # objects of this type will be filtered when they appear in error payload.
738
+ # Corresponds to the JSON property `isErrorType`
739
+ # @return [Boolean]
740
+ attr_accessor :is_error_type
741
+ alias_method :is_error_type?, :is_error_type
742
+
743
+ # Selects messages to which this rule applies.
744
+ # Refer to selector for syntax details.
745
+ # Corresponds to the JSON property `selector`
746
+ # @return [String]
747
+ attr_accessor :selector
748
+
749
+ def initialize(**args)
750
+ update!(**args)
751
+ end
752
+
753
+ # Update properties of this object
754
+ def update!(**args)
755
+ @is_error_type = args[:is_error_type] if args.key?(:is_error_type)
756
+ @selector = args[:selector] if args.key?(:selector)
757
+ end
758
+ end
759
+
760
+ # A custom pattern is used for defining custom HTTP verb.
761
+ class CustomHttpPattern
762
+ include Google::Apis::Core::Hashable
763
+
764
+ # The name of this custom HTTP verb.
765
+ # Corresponds to the JSON property `kind`
766
+ # @return [String]
767
+ attr_accessor :kind
768
+
769
+ # The path matched by this custom verb.
770
+ # Corresponds to the JSON property `path`
771
+ # @return [String]
772
+ attr_accessor :path
773
+
774
+ def initialize(**args)
775
+ update!(**args)
776
+ end
777
+
778
+ # Update properties of this object
779
+ def update!(**args)
780
+ @kind = args[:kind] if args.key?(:kind)
781
+ @path = args[:path] if args.key?(:path)
782
+ end
783
+ end
784
+
785
+ # Request message for the `DisableService` method.
786
+ class DisableServiceRequest
787
+ include Google::Apis::Core::Hashable
788
+
789
+ # Indicates if services that are enabled and which depend on this service
790
+ # should also be disabled. If not set, an error will be generated if any
791
+ # enabled services depend on the service to be disabled. When set, the
792
+ # service, and any enabled services that depend on it, will be disabled
793
+ # together.
794
+ # Corresponds to the JSON property `disableDependentServices`
795
+ # @return [Boolean]
796
+ attr_accessor :disable_dependent_services
797
+ alias_method :disable_dependent_services?, :disable_dependent_services
798
+
799
+ def initialize(**args)
800
+ update!(**args)
801
+ end
802
+
803
+ # Update properties of this object
804
+ def update!(**args)
805
+ @disable_dependent_services = args[:disable_dependent_services] if args.key?(:disable_dependent_services)
806
+ end
807
+ end
808
+
809
+ # Response message for the `DisableService` method.
810
+ # This response message is assigned to the `response` field of the returned
811
+ # Operation when that operation is done.
812
+ class DisableServiceResponse
813
+ include Google::Apis::Core::Hashable
814
+
815
+ # A service that is available for use by the consumer.
816
+ # Corresponds to the JSON property `service`
817
+ # @return [Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service]
818
+ attr_accessor :service
819
+
820
+ def initialize(**args)
821
+ update!(**args)
822
+ end
823
+
824
+ # Update properties of this object
825
+ def update!(**args)
826
+ @service = args[:service] if args.key?(:service)
827
+ end
828
+ end
829
+
830
+ # `Documentation` provides the information for describing a service.
831
+ # Example:
832
+ # <pre><code>documentation:
833
+ # summary: >
834
+ # The Google Calendar API gives access
835
+ # to most calendar features.
836
+ # pages:
837
+ # - name: Overview
838
+ # content: &#40;== include google/foo/overview.md ==&#41;
839
+ # - name: Tutorial
840
+ # content: &#40;== include google/foo/tutorial.md ==&#41;
841
+ # subpages;
842
+ # - name: Java
843
+ # content: &#40;== include google/foo/tutorial_java.md ==&#41;
844
+ # rules:
845
+ # - selector: google.calendar.Calendar.Get
846
+ # description: >
847
+ # ...
848
+ # - selector: google.calendar.Calendar.Put
849
+ # description: >
850
+ # ...
851
+ # </code></pre>
852
+ # Documentation is provided in markdown syntax. In addition to
853
+ # standard markdown features, definition lists, tables and fenced
854
+ # code blocks are supported. Section headers can be provided and are
855
+ # interpreted relative to the section nesting of the context where
856
+ # a documentation fragment is embedded.
857
+ # Documentation from the IDL is merged with documentation defined
858
+ # via the config at normalization time, where documentation provided
859
+ # by config rules overrides IDL provided.
860
+ # A number of constructs specific to the API platform are supported
861
+ # in documentation text.
862
+ # In order to reference a proto element, the following
863
+ # notation can be used:
864
+ # <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
865
+ # To override the display text used for the link, this can be used:
866
+ # <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
867
+ # Text can be excluded from doc using the following notation:
868
+ # <pre><code>&#40;-- internal comment --&#41;</code></pre>
869
+ # A few directives are available in documentation. Note that
870
+ # directives must appear on a single line to be properly
871
+ # identified. The `include` directive includes a markdown file from
872
+ # an external source:
873
+ # <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
874
+ # The `resource_for` directive marks a message to be the resource of
875
+ # a collection in REST view. If it is not specified, tools attempt
876
+ # to infer the resource from the operations in a collection:
877
+ # <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
878
+ # The directive `suppress_warning` does not directly affect documentation
879
+ # and is documented together with service config validation.
880
+ class Documentation
881
+ include Google::Apis::Core::Hashable
882
+
883
+ # The URL to the root of documentation.
884
+ # Corresponds to the JSON property `documentationRootUrl`
885
+ # @return [String]
886
+ attr_accessor :documentation_root_url
887
+
888
+ # Declares a single overview page. For example:
889
+ # <pre><code>documentation:
890
+ # summary: ...
891
+ # overview: &#40;== include overview.md ==&#41;
892
+ # </code></pre>
893
+ # This is a shortcut for the following declaration (using pages style):
894
+ # <pre><code>documentation:
895
+ # summary: ...
896
+ # pages:
897
+ # - name: Overview
898
+ # content: &#40;== include overview.md ==&#41;
899
+ # </code></pre>
900
+ # Note: you cannot specify both `overview` field and `pages` field.
901
+ # Corresponds to the JSON property `overview`
902
+ # @return [String]
903
+ attr_accessor :overview
904
+
905
+ # The top level pages for the documentation set.
906
+ # Corresponds to the JSON property `pages`
907
+ # @return [Array<Google::Apis::ServiceusageV1::Page>]
908
+ attr_accessor :pages
909
+
910
+ # A list of documentation rules that apply to individual API elements.
911
+ # **NOTE:** All service configuration rules follow "last one wins" order.
912
+ # Corresponds to the JSON property `rules`
913
+ # @return [Array<Google::Apis::ServiceusageV1::DocumentationRule>]
914
+ attr_accessor :rules
915
+
916
+ # A short summary of what the service does. Can only be provided by
917
+ # plain text.
918
+ # Corresponds to the JSON property `summary`
919
+ # @return [String]
920
+ attr_accessor :summary
921
+
922
+ def initialize(**args)
923
+ update!(**args)
924
+ end
925
+
926
+ # Update properties of this object
927
+ def update!(**args)
928
+ @documentation_root_url = args[:documentation_root_url] if args.key?(:documentation_root_url)
929
+ @overview = args[:overview] if args.key?(:overview)
930
+ @pages = args[:pages] if args.key?(:pages)
931
+ @rules = args[:rules] if args.key?(:rules)
932
+ @summary = args[:summary] if args.key?(:summary)
933
+ end
934
+ end
935
+
936
+ # A documentation rule provides information about individual API elements.
937
+ class DocumentationRule
938
+ include Google::Apis::Core::Hashable
939
+
940
+ # Deprecation description of the selected element(s). It can be provided if an
941
+ # element is marked as `deprecated`.
942
+ # Corresponds to the JSON property `deprecationDescription`
943
+ # @return [String]
944
+ attr_accessor :deprecation_description
945
+
946
+ # Description of the selected API(s).
947
+ # Corresponds to the JSON property `description`
948
+ # @return [String]
949
+ attr_accessor :description
950
+
951
+ # The selector is a comma-separated list of patterns. Each pattern is a
952
+ # qualified name of the element which may end in "*", indicating a wildcard.
953
+ # Wildcards are only allowed at the end and for a whole component of the
954
+ # qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
955
+ # specify a default for all applicable elements, the whole pattern "*"
956
+ # is used.
957
+ # Corresponds to the JSON property `selector`
958
+ # @return [String]
959
+ attr_accessor :selector
960
+
961
+ def initialize(**args)
962
+ update!(**args)
963
+ end
964
+
965
+ # Update properties of this object
966
+ def update!(**args)
967
+ @deprecation_description = args[:deprecation_description] if args.key?(:deprecation_description)
968
+ @description = args[:description] if args.key?(:description)
969
+ @selector = args[:selector] if args.key?(:selector)
970
+ end
971
+ end
972
+
973
+ # A generic empty message that you can re-use to avoid defining duplicated
974
+ # empty messages in your APIs. A typical example is to use it as the request
975
+ # or the response type of an API method. For instance:
976
+ # service Foo `
977
+ # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
978
+ # `
979
+ # The JSON representation for `Empty` is empty JSON object ````.
980
+ class Empty
981
+ include Google::Apis::Core::Hashable
982
+
983
+ def initialize(**args)
984
+ update!(**args)
985
+ end
986
+
987
+ # Update properties of this object
988
+ def update!(**args)
989
+ end
990
+ end
991
+
992
+ # Provides error messages for the failing services.
993
+ class EnableFailure
994
+ include Google::Apis::Core::Hashable
995
+
996
+ # An error message describing why the service could not be enabled.
997
+ # Corresponds to the JSON property `errorMessage`
998
+ # @return [String]
999
+ attr_accessor :error_message
1000
+
1001
+ # The service id of a service that could not be enabled.
1002
+ # Corresponds to the JSON property `serviceId`
1003
+ # @return [String]
1004
+ attr_accessor :service_id
1005
+
1006
+ def initialize(**args)
1007
+ update!(**args)
1008
+ end
1009
+
1010
+ # Update properties of this object
1011
+ def update!(**args)
1012
+ @error_message = args[:error_message] if args.key?(:error_message)
1013
+ @service_id = args[:service_id] if args.key?(:service_id)
1014
+ end
1015
+ end
1016
+
1017
+ # Request message for the `EnableService` method.
1018
+ class EnableServiceRequest
1019
+ include Google::Apis::Core::Hashable
1020
+
1021
+ def initialize(**args)
1022
+ update!(**args)
1023
+ end
1024
+
1025
+ # Update properties of this object
1026
+ def update!(**args)
1027
+ end
1028
+ end
1029
+
1030
+ # Response message for the `EnableService` method.
1031
+ # This response message is assigned to the `response` field of the returned
1032
+ # Operation when that operation is done.
1033
+ class EnableServiceResponse
1034
+ include Google::Apis::Core::Hashable
1035
+
1036
+ # A service that is available for use by the consumer.
1037
+ # Corresponds to the JSON property `service`
1038
+ # @return [Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service]
1039
+ attr_accessor :service
1040
+
1041
+ def initialize(**args)
1042
+ update!(**args)
1043
+ end
1044
+
1045
+ # Update properties of this object
1046
+ def update!(**args)
1047
+ @service = args[:service] if args.key?(:service)
1048
+ end
1049
+ end
1050
+
1051
+ # `Endpoint` describes a network endpoint that serves a set of APIs.
1052
+ # A service may expose any number of endpoints, and all endpoints share the
1053
+ # same service configuration, such as quota configuration and monitoring
1054
+ # configuration.
1055
+ # Example service configuration:
1056
+ # name: library-example.googleapis.com
1057
+ # endpoints:
1058
+ # # Below entry makes 'google.example.library.v1.Library'
1059
+ # # API be served from endpoint address library-example.googleapis.com.
1060
+ # # It also allows HTTP OPTIONS calls to be passed to the backend, for
1061
+ # # it to decide whether the subsequent cross-origin request is
1062
+ # # allowed to proceed.
1063
+ # - name: library-example.googleapis.com
1064
+ # allow_cors: true
1065
+ class Endpoint
1066
+ include Google::Apis::Core::Hashable
1067
+
1068
+ # DEPRECATED: This field is no longer supported. Instead of using aliases,
1069
+ # please specify multiple google.api.Endpoint for each of the intended
1070
+ # aliases.
1071
+ # Additional names that this endpoint will be hosted on.
1072
+ # Corresponds to the JSON property `aliases`
1073
+ # @return [Array<String>]
1074
+ attr_accessor :aliases
1075
+
1076
+ # Allowing
1077
+ # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
1078
+ # cross-domain traffic, would allow the backends served from this endpoint to
1079
+ # receive and respond to HTTP OPTIONS requests. The response will be used by
1080
+ # the browser to determine whether the subsequent cross-origin request is
1081
+ # allowed to proceed.
1082
+ # Corresponds to the JSON property `allowCors`
1083
+ # @return [Boolean]
1084
+ attr_accessor :allow_cors
1085
+ alias_method :allow_cors?, :allow_cors
1086
+
1087
+ # The list of features enabled on this endpoint.
1088
+ # Corresponds to the JSON property `features`
1089
+ # @return [Array<String>]
1090
+ attr_accessor :features
1091
+
1092
+ # The canonical name of this endpoint.
1093
+ # Corresponds to the JSON property `name`
1094
+ # @return [String]
1095
+ attr_accessor :name
1096
+
1097
+ # The specification of an Internet routable address of API frontend that will
1098
+ # handle requests to this [API Endpoint](https://cloud.google.com/apis/design/
1099
+ # glossary).
1100
+ # It should be either a valid IPv4 address or a fully-qualified domain name.
1101
+ # For example, "8.8.8.8" or "myservice.appspot.com".
1102
+ # Corresponds to the JSON property `target`
1103
+ # @return [String]
1104
+ attr_accessor :target
1105
+
1106
+ def initialize(**args)
1107
+ update!(**args)
1108
+ end
1109
+
1110
+ # Update properties of this object
1111
+ def update!(**args)
1112
+ @aliases = args[:aliases] if args.key?(:aliases)
1113
+ @allow_cors = args[:allow_cors] if args.key?(:allow_cors)
1114
+ @features = args[:features] if args.key?(:features)
1115
+ @name = args[:name] if args.key?(:name)
1116
+ @target = args[:target] if args.key?(:target)
1117
+ end
1118
+ end
1119
+
1120
+ # Enum type definition.
1121
+ class Enum
1122
+ include Google::Apis::Core::Hashable
1123
+
1124
+ # Enum value definitions.
1125
+ # Corresponds to the JSON property `enumvalue`
1126
+ # @return [Array<Google::Apis::ServiceusageV1::EnumValue>]
1127
+ attr_accessor :enumvalue
1128
+
1129
+ # Enum type name.
1130
+ # Corresponds to the JSON property `name`
1131
+ # @return [String]
1132
+ attr_accessor :name
1133
+
1134
+ # Protocol buffer options.
1135
+ # Corresponds to the JSON property `options`
1136
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
1137
+ attr_accessor :options
1138
+
1139
+ # `SourceContext` represents information about the source of a
1140
+ # protobuf element, like the file in which it is defined.
1141
+ # Corresponds to the JSON property `sourceContext`
1142
+ # @return [Google::Apis::ServiceusageV1::SourceContext]
1143
+ attr_accessor :source_context
1144
+
1145
+ # The source syntax.
1146
+ # Corresponds to the JSON property `syntax`
1147
+ # @return [String]
1148
+ attr_accessor :syntax
1149
+
1150
+ def initialize(**args)
1151
+ update!(**args)
1152
+ end
1153
+
1154
+ # Update properties of this object
1155
+ def update!(**args)
1156
+ @enumvalue = args[:enumvalue] if args.key?(:enumvalue)
1157
+ @name = args[:name] if args.key?(:name)
1158
+ @options = args[:options] if args.key?(:options)
1159
+ @source_context = args[:source_context] if args.key?(:source_context)
1160
+ @syntax = args[:syntax] if args.key?(:syntax)
1161
+ end
1162
+ end
1163
+
1164
+ # Enum value definition.
1165
+ class EnumValue
1166
+ include Google::Apis::Core::Hashable
1167
+
1168
+ # Enum value name.
1169
+ # Corresponds to the JSON property `name`
1170
+ # @return [String]
1171
+ attr_accessor :name
1172
+
1173
+ # Enum value number.
1174
+ # Corresponds to the JSON property `number`
1175
+ # @return [Fixnum]
1176
+ attr_accessor :number
1177
+
1178
+ # Protocol buffer options.
1179
+ # Corresponds to the JSON property `options`
1180
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
1181
+ attr_accessor :options
1182
+
1183
+ def initialize(**args)
1184
+ update!(**args)
1185
+ end
1186
+
1187
+ # Update properties of this object
1188
+ def update!(**args)
1189
+ @name = args[:name] if args.key?(:name)
1190
+ @number = args[:number] if args.key?(:number)
1191
+ @options = args[:options] if args.key?(:options)
1192
+ end
1193
+ end
1194
+
1195
+ # Experimental service configuration. These configuration options can
1196
+ # only be used by whitelisted users.
1197
+ class Experimental
1198
+ include Google::Apis::Core::Hashable
1199
+
1200
+ # Configuration of authorization.
1201
+ # This section determines the authorization provider, if unspecified, then no
1202
+ # authorization check will be done.
1203
+ # Example:
1204
+ # experimental:
1205
+ # authorization:
1206
+ # provider: firebaserules.googleapis.com
1207
+ # Corresponds to the JSON property `authorization`
1208
+ # @return [Google::Apis::ServiceusageV1::AuthorizationConfig]
1209
+ attr_accessor :authorization
1210
+
1211
+ def initialize(**args)
1212
+ update!(**args)
1213
+ end
1214
+
1215
+ # Update properties of this object
1216
+ def update!(**args)
1217
+ @authorization = args[:authorization] if args.key?(:authorization)
1218
+ end
1219
+ end
1220
+
1221
+ # A single field of a message type.
1222
+ class Field
1223
+ include Google::Apis::Core::Hashable
1224
+
1225
+ # The field cardinality.
1226
+ # Corresponds to the JSON property `cardinality`
1227
+ # @return [String]
1228
+ attr_accessor :cardinality
1229
+
1230
+ # The string value of the default value of this field. Proto2 syntax only.
1231
+ # Corresponds to the JSON property `defaultValue`
1232
+ # @return [String]
1233
+ attr_accessor :default_value
1234
+
1235
+ # The field JSON name.
1236
+ # Corresponds to the JSON property `jsonName`
1237
+ # @return [String]
1238
+ attr_accessor :json_name
1239
+
1240
+ # The field type.
1241
+ # Corresponds to the JSON property `kind`
1242
+ # @return [String]
1243
+ attr_accessor :kind
1244
+
1245
+ # The field name.
1246
+ # Corresponds to the JSON property `name`
1247
+ # @return [String]
1248
+ attr_accessor :name
1249
+
1250
+ # The field number.
1251
+ # Corresponds to the JSON property `number`
1252
+ # @return [Fixnum]
1253
+ attr_accessor :number
1254
+
1255
+ # The index of the field type in `Type.oneofs`, for message or enumeration
1256
+ # types. The first type has index 1; zero means the type is not in the list.
1257
+ # Corresponds to the JSON property `oneofIndex`
1258
+ # @return [Fixnum]
1259
+ attr_accessor :oneof_index
1260
+
1261
+ # The protocol buffer options.
1262
+ # Corresponds to the JSON property `options`
1263
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
1264
+ attr_accessor :options
1265
+
1266
+ # Whether to use alternative packed wire representation.
1267
+ # Corresponds to the JSON property `packed`
1268
+ # @return [Boolean]
1269
+ attr_accessor :packed
1270
+ alias_method :packed?, :packed
1271
+
1272
+ # The field type URL, without the scheme, for message or enumeration
1273
+ # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
1274
+ # Corresponds to the JSON property `typeUrl`
1275
+ # @return [String]
1276
+ attr_accessor :type_url
1277
+
1278
+ def initialize(**args)
1279
+ update!(**args)
1280
+ end
1281
+
1282
+ # Update properties of this object
1283
+ def update!(**args)
1284
+ @cardinality = args[:cardinality] if args.key?(:cardinality)
1285
+ @default_value = args[:default_value] if args.key?(:default_value)
1286
+ @json_name = args[:json_name] if args.key?(:json_name)
1287
+ @kind = args[:kind] if args.key?(:kind)
1288
+ @name = args[:name] if args.key?(:name)
1289
+ @number = args[:number] if args.key?(:number)
1290
+ @oneof_index = args[:oneof_index] if args.key?(:oneof_index)
1291
+ @options = args[:options] if args.key?(:options)
1292
+ @packed = args[:packed] if args.key?(:packed)
1293
+ @type_url = args[:type_url] if args.key?(:type_url)
1294
+ end
1295
+ end
1296
+
1297
+ # `Service` is the root object of Google service configuration schema. It
1298
+ # describes basic information about a service, such as the name and the
1299
+ # title, and delegates other aspects to sub-sections. Each sub-section is
1300
+ # either a proto message or a repeated proto message that configures a
1301
+ # specific aspect, such as auth. See each proto message definition for details.
1302
+ # Example:
1303
+ # type: google.api.Service
1304
+ # config_version: 3
1305
+ # name: calendar.googleapis.com
1306
+ # title: Google Calendar API
1307
+ # apis:
1308
+ # - name: google.calendar.v3.Calendar
1309
+ # authentication:
1310
+ # providers:
1311
+ # - id: google_calendar_auth
1312
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
1313
+ # issuer: https://securetoken.google.com
1314
+ # rules:
1315
+ # - selector: "*"
1316
+ # requirements:
1317
+ # provider_id: google_calendar_auth
1318
+ class GoogleApiService
1319
+ include Google::Apis::Core::Hashable
1320
+
1321
+ # A list of API interfaces exported by this service. Only the `name` field
1322
+ # of the google.protobuf.Api needs to be provided by the configuration
1323
+ # author, as the remaining fields will be derived from the IDL during the
1324
+ # normalization process. It is an error to specify an API interface here
1325
+ # which cannot be resolved against the associated IDL files.
1326
+ # Corresponds to the JSON property `apis`
1327
+ # @return [Array<Google::Apis::ServiceusageV1::Api>]
1328
+ attr_accessor :apis
1329
+
1330
+ # `Authentication` defines the authentication configuration for an API.
1331
+ # Example for an API targeted for external use:
1332
+ # name: calendar.googleapis.com
1333
+ # authentication:
1334
+ # providers:
1335
+ # - id: google_calendar_auth
1336
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
1337
+ # issuer: https://securetoken.google.com
1338
+ # rules:
1339
+ # - selector: "*"
1340
+ # requirements:
1341
+ # provider_id: google_calendar_auth
1342
+ # Corresponds to the JSON property `authentication`
1343
+ # @return [Google::Apis::ServiceusageV1::Authentication]
1344
+ attr_accessor :authentication
1345
+
1346
+ # `Backend` defines the backend configuration for a service.
1347
+ # Corresponds to the JSON property `backend`
1348
+ # @return [Google::Apis::ServiceusageV1::Backend]
1349
+ attr_accessor :backend
1350
+
1351
+ # Billing related configuration of the service.
1352
+ # The following example shows how to configure monitored resources and metrics
1353
+ # for billing:
1354
+ # monitored_resources:
1355
+ # - type: library.googleapis.com/branch
1356
+ # labels:
1357
+ # - key: /city
1358
+ # description: The city where the library branch is located in.
1359
+ # - key: /name
1360
+ # description: The name of the branch.
1361
+ # metrics:
1362
+ # - name: library.googleapis.com/book/borrowed_count
1363
+ # metric_kind: DELTA
1364
+ # value_type: INT64
1365
+ # billing:
1366
+ # consumer_destinations:
1367
+ # - monitored_resource: library.googleapis.com/branch
1368
+ # metrics:
1369
+ # - library.googleapis.com/book/borrowed_count
1370
+ # Corresponds to the JSON property `billing`
1371
+ # @return [Google::Apis::ServiceusageV1::Billing]
1372
+ attr_accessor :billing
1373
+
1374
+ # The semantic version of the service configuration. The config version
1375
+ # affects the interpretation of the service configuration. For example,
1376
+ # certain features are enabled by default for certain config versions.
1377
+ # The latest config version is `3`.
1378
+ # Corresponds to the JSON property `configVersion`
1379
+ # @return [Fixnum]
1380
+ attr_accessor :config_version
1381
+
1382
+ # `Context` defines which contexts an API requests.
1383
+ # Example:
1384
+ # context:
1385
+ # rules:
1386
+ # - selector: "*"
1387
+ # requested:
1388
+ # - google.rpc.context.ProjectContext
1389
+ # - google.rpc.context.OriginContext
1390
+ # The above specifies that all methods in the API request
1391
+ # `google.rpc.context.ProjectContext` and
1392
+ # `google.rpc.context.OriginContext`.
1393
+ # Available context types are defined in package
1394
+ # `google.rpc.context`.
1395
+ # This also provides mechanism to whitelist any protobuf message extension that
1396
+ # can be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and
1397
+ # “x-goog-ext-<extension_id>-jspb” format. For example, list any service
1398
+ # specific protobuf types that can appear in grpc metadata as follows in your
1399
+ # yaml file:
1400
+ # Example:
1401
+ # context:
1402
+ # rules:
1403
+ # - selector: "google.example.library.v1.LibraryService.CreateBook"
1404
+ # allowed_request_extensions:
1405
+ # - google.foo.v1.NewExtension
1406
+ # allowed_response_extensions:
1407
+ # - google.foo.v1.NewExtension
1408
+ # You can also specify extension ID instead of fully qualified extension name
1409
+ # here.
1410
+ # Corresponds to the JSON property `context`
1411
+ # @return [Google::Apis::ServiceusageV1::Context]
1412
+ attr_accessor :context
1413
+
1414
+ # Selects and configures the service controller used by the service. The
1415
+ # service controller handles features like abuse, quota, billing, logging,
1416
+ # monitoring, etc.
1417
+ # Corresponds to the JSON property `control`
1418
+ # @return [Google::Apis::ServiceusageV1::Control]
1419
+ attr_accessor :control
1420
+
1421
+ # Customize service error responses. For example, list any service
1422
+ # specific protobuf types that can appear in error detail lists of
1423
+ # error responses.
1424
+ # Example:
1425
+ # custom_error:
1426
+ # types:
1427
+ # - google.foo.v1.CustomError
1428
+ # - google.foo.v1.AnotherError
1429
+ # Corresponds to the JSON property `customError`
1430
+ # @return [Google::Apis::ServiceusageV1::CustomError]
1431
+ attr_accessor :custom_error
1432
+
1433
+ # `Documentation` provides the information for describing a service.
1434
+ # Example:
1435
+ # <pre><code>documentation:
1436
+ # summary: >
1437
+ # The Google Calendar API gives access
1438
+ # to most calendar features.
1439
+ # pages:
1440
+ # - name: Overview
1441
+ # content: &#40;== include google/foo/overview.md ==&#41;
1442
+ # - name: Tutorial
1443
+ # content: &#40;== include google/foo/tutorial.md ==&#41;
1444
+ # subpages;
1445
+ # - name: Java
1446
+ # content: &#40;== include google/foo/tutorial_java.md ==&#41;
1447
+ # rules:
1448
+ # - selector: google.calendar.Calendar.Get
1449
+ # description: >
1450
+ # ...
1451
+ # - selector: google.calendar.Calendar.Put
1452
+ # description: >
1453
+ # ...
1454
+ # </code></pre>
1455
+ # Documentation is provided in markdown syntax. In addition to
1456
+ # standard markdown features, definition lists, tables and fenced
1457
+ # code blocks are supported. Section headers can be provided and are
1458
+ # interpreted relative to the section nesting of the context where
1459
+ # a documentation fragment is embedded.
1460
+ # Documentation from the IDL is merged with documentation defined
1461
+ # via the config at normalization time, where documentation provided
1462
+ # by config rules overrides IDL provided.
1463
+ # A number of constructs specific to the API platform are supported
1464
+ # in documentation text.
1465
+ # In order to reference a proto element, the following
1466
+ # notation can be used:
1467
+ # <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
1468
+ # To override the display text used for the link, this can be used:
1469
+ # <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
1470
+ # Text can be excluded from doc using the following notation:
1471
+ # <pre><code>&#40;-- internal comment --&#41;</code></pre>
1472
+ # A few directives are available in documentation. Note that
1473
+ # directives must appear on a single line to be properly
1474
+ # identified. The `include` directive includes a markdown file from
1475
+ # an external source:
1476
+ # <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
1477
+ # The `resource_for` directive marks a message to be the resource of
1478
+ # a collection in REST view. If it is not specified, tools attempt
1479
+ # to infer the resource from the operations in a collection:
1480
+ # <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
1481
+ # The directive `suppress_warning` does not directly affect documentation
1482
+ # and is documented together with service config validation.
1483
+ # Corresponds to the JSON property `documentation`
1484
+ # @return [Google::Apis::ServiceusageV1::Documentation]
1485
+ attr_accessor :documentation
1486
+
1487
+ # Configuration for network endpoints. If this is empty, then an endpoint
1488
+ # with the same name as the service is automatically generated to service all
1489
+ # defined APIs.
1490
+ # Corresponds to the JSON property `endpoints`
1491
+ # @return [Array<Google::Apis::ServiceusageV1::Endpoint>]
1492
+ attr_accessor :endpoints
1493
+
1494
+ # A list of all enum types included in this API service. Enums
1495
+ # referenced directly or indirectly by the `apis` are automatically
1496
+ # included. Enums which are not referenced but shall be included
1497
+ # should be listed here by name. Example:
1498
+ # enums:
1499
+ # - name: google.someapi.v1.SomeEnum
1500
+ # Corresponds to the JSON property `enums`
1501
+ # @return [Array<Google::Apis::ServiceusageV1::Enum>]
1502
+ attr_accessor :enums
1503
+
1504
+ # Experimental service configuration. These configuration options can
1505
+ # only be used by whitelisted users.
1506
+ # Corresponds to the JSON property `experimental`
1507
+ # @return [Google::Apis::ServiceusageV1::Experimental]
1508
+ attr_accessor :experimental
1509
+
1510
+ # Defines the HTTP configuration for an API service. It contains a list of
1511
+ # HttpRule, each specifying the mapping of an RPC method
1512
+ # to one or more HTTP REST API methods.
1513
+ # Corresponds to the JSON property `http`
1514
+ # @return [Google::Apis::ServiceusageV1::Http]
1515
+ attr_accessor :http
1516
+
1517
+ # A unique ID for a specific instance of this message, typically assigned
1518
+ # by the client for tracking purpose. If empty, the server may choose to
1519
+ # generate one instead.
1520
+ # Corresponds to the JSON property `id`
1521
+ # @return [String]
1522
+ attr_accessor :id
1523
+
1524
+ # Logging configuration of the service.
1525
+ # The following example shows how to configure logs to be sent to the
1526
+ # producer and consumer projects. In the example, the `activity_history`
1527
+ # log is sent to both the producer and consumer projects, whereas the
1528
+ # `purchase_history` log is only sent to the producer project.
1529
+ # monitored_resources:
1530
+ # - type: library.googleapis.com/branch
1531
+ # labels:
1532
+ # - key: /city
1533
+ # description: The city where the library branch is located in.
1534
+ # - key: /name
1535
+ # description: The name of the branch.
1536
+ # logs:
1537
+ # - name: activity_history
1538
+ # labels:
1539
+ # - key: /customer_id
1540
+ # - name: purchase_history
1541
+ # logging:
1542
+ # producer_destinations:
1543
+ # - monitored_resource: library.googleapis.com/branch
1544
+ # logs:
1545
+ # - activity_history
1546
+ # - purchase_history
1547
+ # consumer_destinations:
1548
+ # - monitored_resource: library.googleapis.com/branch
1549
+ # logs:
1550
+ # - activity_history
1551
+ # Corresponds to the JSON property `logging`
1552
+ # @return [Google::Apis::ServiceusageV1::Logging]
1553
+ attr_accessor :logging
1554
+
1555
+ # Defines the logs used by this service.
1556
+ # Corresponds to the JSON property `logs`
1557
+ # @return [Array<Google::Apis::ServiceusageV1::LogDescriptor>]
1558
+ attr_accessor :logs
1559
+
1560
+ # Defines the metrics used by this service.
1561
+ # Corresponds to the JSON property `metrics`
1562
+ # @return [Array<Google::Apis::ServiceusageV1::MetricDescriptor>]
1563
+ attr_accessor :metrics
1564
+
1565
+ # Defines the monitored resources used by this service. This is required
1566
+ # by the Service.monitoring and Service.logging configurations.
1567
+ # Corresponds to the JSON property `monitoredResources`
1568
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoredResourceDescriptor>]
1569
+ attr_accessor :monitored_resources
1570
+
1571
+ # Monitoring configuration of the service.
1572
+ # The example below shows how to configure monitored resources and metrics
1573
+ # for monitoring. In the example, a monitored resource and two metrics are
1574
+ # defined. The `library.googleapis.com/book/returned_count` metric is sent
1575
+ # to both producer and consumer projects, whereas the
1576
+ # `library.googleapis.com/book/overdue_count` metric is only sent to the
1577
+ # consumer project.
1578
+ # monitored_resources:
1579
+ # - type: library.googleapis.com/branch
1580
+ # labels:
1581
+ # - key: /city
1582
+ # description: The city where the library branch is located in.
1583
+ # - key: /name
1584
+ # description: The name of the branch.
1585
+ # metrics:
1586
+ # - name: library.googleapis.com/book/returned_count
1587
+ # metric_kind: DELTA
1588
+ # value_type: INT64
1589
+ # labels:
1590
+ # - key: /customer_id
1591
+ # - name: library.googleapis.com/book/overdue_count
1592
+ # metric_kind: GAUGE
1593
+ # value_type: INT64
1594
+ # labels:
1595
+ # - key: /customer_id
1596
+ # monitoring:
1597
+ # producer_destinations:
1598
+ # - monitored_resource: library.googleapis.com/branch
1599
+ # metrics:
1600
+ # - library.googleapis.com/book/returned_count
1601
+ # consumer_destinations:
1602
+ # - monitored_resource: library.googleapis.com/branch
1603
+ # metrics:
1604
+ # - library.googleapis.com/book/returned_count
1605
+ # - library.googleapis.com/book/overdue_count
1606
+ # Corresponds to the JSON property `monitoring`
1607
+ # @return [Google::Apis::ServiceusageV1::Monitoring]
1608
+ attr_accessor :monitoring
1609
+
1610
+ # The DNS address at which this service is available,
1611
+ # e.g. `calendar.googleapis.com`.
1612
+ # Corresponds to the JSON property `name`
1613
+ # @return [String]
1614
+ attr_accessor :name
1615
+
1616
+ # The Google project that owns this service.
1617
+ # Corresponds to the JSON property `producerProjectId`
1618
+ # @return [String]
1619
+ attr_accessor :producer_project_id
1620
+
1621
+ # Quota configuration helps to achieve fairness and budgeting in service
1622
+ # usage.
1623
+ # The quota configuration works this way:
1624
+ # - The service configuration defines a set of metrics.
1625
+ # - For API calls, the quota.metric_rules maps methods to metrics with
1626
+ # corresponding costs.
1627
+ # - The quota.limits defines limits on the metrics, which will be used for
1628
+ # quota checks at runtime.
1629
+ # An example quota configuration in yaml format:
1630
+ # quota:
1631
+ # - name: apiWriteQpsPerProject
1632
+ # metric: library.googleapis.com/write_calls
1633
+ # unit: "1/min/`project`" # rate limit for consumer projects
1634
+ # values:
1635
+ # STANDARD: 10000
1636
+ # # The metric rules bind all methods to the read_calls metric,
1637
+ # # except for the UpdateBook and DeleteBook methods. These two methods
1638
+ # # are mapped to the write_calls metric, with the UpdateBook method
1639
+ # # consuming at twice rate as the DeleteBook method.
1640
+ # metric_rules:
1641
+ # - selector: "*"
1642
+ # metric_costs:
1643
+ # library.googleapis.com/read_calls: 1
1644
+ # - selector: google.example.library.v1.LibraryService.UpdateBook
1645
+ # metric_costs:
1646
+ # library.googleapis.com/write_calls: 2
1647
+ # - selector: google.example.library.v1.LibraryService.DeleteBook
1648
+ # metric_costs:
1649
+ # library.googleapis.com/write_calls: 1
1650
+ # Corresponding Metric definition:
1651
+ # metrics:
1652
+ # - name: library.googleapis.com/read_calls
1653
+ # display_name: Read requests
1654
+ # metric_kind: DELTA
1655
+ # value_type: INT64
1656
+ # - name: library.googleapis.com/write_calls
1657
+ # display_name: Write requests
1658
+ # metric_kind: DELTA
1659
+ # value_type: INT64
1660
+ # Corresponds to the JSON property `quota`
1661
+ # @return [Google::Apis::ServiceusageV1::Quota]
1662
+ attr_accessor :quota
1663
+
1664
+ # Source information used to create a Service Config
1665
+ # Corresponds to the JSON property `sourceInfo`
1666
+ # @return [Google::Apis::ServiceusageV1::SourceInfo]
1667
+ attr_accessor :source_info
1668
+
1669
+ # ### System parameter configuration
1670
+ # A system parameter is a special kind of parameter defined by the API
1671
+ # system, not by an individual API. It is typically mapped to an HTTP header
1672
+ # and/or a URL query parameter. This configuration specifies which methods
1673
+ # change the names of the system parameters.
1674
+ # Corresponds to the JSON property `systemParameters`
1675
+ # @return [Google::Apis::ServiceusageV1::SystemParameters]
1676
+ attr_accessor :system_parameters
1677
+
1678
+ # A list of all proto message types included in this API service.
1679
+ # It serves similar purpose as [google.api.Service.types], except that
1680
+ # these types are not needed by user-defined APIs. Therefore, they will not
1681
+ # show up in the generated discovery doc. This field should only be used
1682
+ # to define system APIs in ESF.
1683
+ # Corresponds to the JSON property `systemTypes`
1684
+ # @return [Array<Google::Apis::ServiceusageV1::Type>]
1685
+ attr_accessor :system_types
1686
+
1687
+ # The product title for this service.
1688
+ # Corresponds to the JSON property `title`
1689
+ # @return [String]
1690
+ attr_accessor :title
1691
+
1692
+ # A list of all proto message types included in this API service.
1693
+ # Types referenced directly or indirectly by the `apis` are
1694
+ # automatically included. Messages which are not referenced but
1695
+ # shall be included, such as types used by the `google.protobuf.Any` type,
1696
+ # should be listed here by name. Example:
1697
+ # types:
1698
+ # - name: google.protobuf.Int32
1699
+ # Corresponds to the JSON property `types`
1700
+ # @return [Array<Google::Apis::ServiceusageV1::Type>]
1701
+ attr_accessor :types
1702
+
1703
+ # Configuration controlling usage of a service.
1704
+ # Corresponds to the JSON property `usage`
1705
+ # @return [Google::Apis::ServiceusageV1::Usage]
1706
+ attr_accessor :usage
1707
+
1708
+ def initialize(**args)
1709
+ update!(**args)
1710
+ end
1711
+
1712
+ # Update properties of this object
1713
+ def update!(**args)
1714
+ @apis = args[:apis] if args.key?(:apis)
1715
+ @authentication = args[:authentication] if args.key?(:authentication)
1716
+ @backend = args[:backend] if args.key?(:backend)
1717
+ @billing = args[:billing] if args.key?(:billing)
1718
+ @config_version = args[:config_version] if args.key?(:config_version)
1719
+ @context = args[:context] if args.key?(:context)
1720
+ @control = args[:control] if args.key?(:control)
1721
+ @custom_error = args[:custom_error] if args.key?(:custom_error)
1722
+ @documentation = args[:documentation] if args.key?(:documentation)
1723
+ @endpoints = args[:endpoints] if args.key?(:endpoints)
1724
+ @enums = args[:enums] if args.key?(:enums)
1725
+ @experimental = args[:experimental] if args.key?(:experimental)
1726
+ @http = args[:http] if args.key?(:http)
1727
+ @id = args[:id] if args.key?(:id)
1728
+ @logging = args[:logging] if args.key?(:logging)
1729
+ @logs = args[:logs] if args.key?(:logs)
1730
+ @metrics = args[:metrics] if args.key?(:metrics)
1731
+ @monitored_resources = args[:monitored_resources] if args.key?(:monitored_resources)
1732
+ @monitoring = args[:monitoring] if args.key?(:monitoring)
1733
+ @name = args[:name] if args.key?(:name)
1734
+ @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id)
1735
+ @quota = args[:quota] if args.key?(:quota)
1736
+ @source_info = args[:source_info] if args.key?(:source_info)
1737
+ @system_parameters = args[:system_parameters] if args.key?(:system_parameters)
1738
+ @system_types = args[:system_types] if args.key?(:system_types)
1739
+ @title = args[:title] if args.key?(:title)
1740
+ @types = args[:types] if args.key?(:types)
1741
+ @usage = args[:usage] if args.key?(:usage)
1742
+ end
1743
+ end
1744
+
1745
+ # The operation metadata returned for the batchend services operation.
1746
+ class GoogleApiServiceusageV1OperationMetadata
1747
+ include Google::Apis::Core::Hashable
1748
+
1749
+ # The full name of the resources that this operation is directly
1750
+ # associated with.
1751
+ # Corresponds to the JSON property `resourceNames`
1752
+ # @return [Array<String>]
1753
+ attr_accessor :resource_names
1754
+
1755
+ def initialize(**args)
1756
+ update!(**args)
1757
+ end
1758
+
1759
+ # Update properties of this object
1760
+ def update!(**args)
1761
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
1762
+ end
1763
+ end
1764
+
1765
+ # A service that is available for use by the consumer.
1766
+ class GoogleApiServiceusageV1Service
1767
+ include Google::Apis::Core::Hashable
1768
+
1769
+ # The configuration of the service.
1770
+ # Corresponds to the JSON property `config`
1771
+ # @return [Google::Apis::ServiceusageV1::GoogleApiServiceusageV1ServiceConfig]
1772
+ attr_accessor :config
1773
+
1774
+ # The resource name of the consumer and service.
1775
+ # A valid name would be:
1776
+ # - projects/123/services/serviceusage.googleapis.com
1777
+ # Corresponds to the JSON property `name`
1778
+ # @return [String]
1779
+ attr_accessor :name
1780
+
1781
+ # The resource name of the consumer.
1782
+ # A valid name would be:
1783
+ # - projects/123
1784
+ # Corresponds to the JSON property `parent`
1785
+ # @return [String]
1786
+ attr_accessor :parent
1787
+
1788
+ # Whether or not the service has been enabled for use by the consumer.
1789
+ # Corresponds to the JSON property `state`
1790
+ # @return [String]
1791
+ attr_accessor :state
1792
+
1793
+ def initialize(**args)
1794
+ update!(**args)
1795
+ end
1796
+
1797
+ # Update properties of this object
1798
+ def update!(**args)
1799
+ @config = args[:config] if args.key?(:config)
1800
+ @name = args[:name] if args.key?(:name)
1801
+ @parent = args[:parent] if args.key?(:parent)
1802
+ @state = args[:state] if args.key?(:state)
1803
+ end
1804
+ end
1805
+
1806
+ # The configuration of the service.
1807
+ class GoogleApiServiceusageV1ServiceConfig
1808
+ include Google::Apis::Core::Hashable
1809
+
1810
+ # A list of API interfaces exported by this service. Contains only the names,
1811
+ # versions, and method names of the interfaces.
1812
+ # Corresponds to the JSON property `apis`
1813
+ # @return [Array<Google::Apis::ServiceusageV1::Api>]
1814
+ attr_accessor :apis
1815
+
1816
+ # `Authentication` defines the authentication configuration for an API.
1817
+ # Example for an API targeted for external use:
1818
+ # name: calendar.googleapis.com
1819
+ # authentication:
1820
+ # providers:
1821
+ # - id: google_calendar_auth
1822
+ # jwks_uri: https://www.googleapis.com/oauth2/v1/certs
1823
+ # issuer: https://securetoken.google.com
1824
+ # rules:
1825
+ # - selector: "*"
1826
+ # requirements:
1827
+ # provider_id: google_calendar_auth
1828
+ # Corresponds to the JSON property `authentication`
1829
+ # @return [Google::Apis::ServiceusageV1::Authentication]
1830
+ attr_accessor :authentication
1831
+
1832
+ # `Documentation` provides the information for describing a service.
1833
+ # Example:
1834
+ # <pre><code>documentation:
1835
+ # summary: >
1836
+ # The Google Calendar API gives access
1837
+ # to most calendar features.
1838
+ # pages:
1839
+ # - name: Overview
1840
+ # content: &#40;== include google/foo/overview.md ==&#41;
1841
+ # - name: Tutorial
1842
+ # content: &#40;== include google/foo/tutorial.md ==&#41;
1843
+ # subpages;
1844
+ # - name: Java
1845
+ # content: &#40;== include google/foo/tutorial_java.md ==&#41;
1846
+ # rules:
1847
+ # - selector: google.calendar.Calendar.Get
1848
+ # description: >
1849
+ # ...
1850
+ # - selector: google.calendar.Calendar.Put
1851
+ # description: >
1852
+ # ...
1853
+ # </code></pre>
1854
+ # Documentation is provided in markdown syntax. In addition to
1855
+ # standard markdown features, definition lists, tables and fenced
1856
+ # code blocks are supported. Section headers can be provided and are
1857
+ # interpreted relative to the section nesting of the context where
1858
+ # a documentation fragment is embedded.
1859
+ # Documentation from the IDL is merged with documentation defined
1860
+ # via the config at normalization time, where documentation provided
1861
+ # by config rules overrides IDL provided.
1862
+ # A number of constructs specific to the API platform are supported
1863
+ # in documentation text.
1864
+ # In order to reference a proto element, the following
1865
+ # notation can be used:
1866
+ # <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>
1867
+ # To override the display text used for the link, this can be used:
1868
+ # <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
1869
+ # Text can be excluded from doc using the following notation:
1870
+ # <pre><code>&#40;-- internal comment --&#41;</code></pre>
1871
+ # A few directives are available in documentation. Note that
1872
+ # directives must appear on a single line to be properly
1873
+ # identified. The `include` directive includes a markdown file from
1874
+ # an external source:
1875
+ # <pre><code>&#40;== include path/to/file ==&#41;</code></pre>
1876
+ # The `resource_for` directive marks a message to be the resource of
1877
+ # a collection in REST view. If it is not specified, tools attempt
1878
+ # to infer the resource from the operations in a collection:
1879
+ # <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>
1880
+ # The directive `suppress_warning` does not directly affect documentation
1881
+ # and is documented together with service config validation.
1882
+ # Corresponds to the JSON property `documentation`
1883
+ # @return [Google::Apis::ServiceusageV1::Documentation]
1884
+ attr_accessor :documentation
1885
+
1886
+ # Configuration for network endpoints. Contains only the names and aliases
1887
+ # of the endpoints.
1888
+ # Corresponds to the JSON property `endpoints`
1889
+ # @return [Array<Google::Apis::ServiceusageV1::Endpoint>]
1890
+ attr_accessor :endpoints
1891
+
1892
+ # The DNS address at which this service is available.
1893
+ # An example DNS address would be:
1894
+ # `calendar.googleapis.com`.
1895
+ # Corresponds to the JSON property `name`
1896
+ # @return [String]
1897
+ attr_accessor :name
1898
+
1899
+ # Quota configuration helps to achieve fairness and budgeting in service
1900
+ # usage.
1901
+ # The quota configuration works this way:
1902
+ # - The service configuration defines a set of metrics.
1903
+ # - For API calls, the quota.metric_rules maps methods to metrics with
1904
+ # corresponding costs.
1905
+ # - The quota.limits defines limits on the metrics, which will be used for
1906
+ # quota checks at runtime.
1907
+ # An example quota configuration in yaml format:
1908
+ # quota:
1909
+ # - name: apiWriteQpsPerProject
1910
+ # metric: library.googleapis.com/write_calls
1911
+ # unit: "1/min/`project`" # rate limit for consumer projects
1912
+ # values:
1913
+ # STANDARD: 10000
1914
+ # # The metric rules bind all methods to the read_calls metric,
1915
+ # # except for the UpdateBook and DeleteBook methods. These two methods
1916
+ # # are mapped to the write_calls metric, with the UpdateBook method
1917
+ # # consuming at twice rate as the DeleteBook method.
1918
+ # metric_rules:
1919
+ # - selector: "*"
1920
+ # metric_costs:
1921
+ # library.googleapis.com/read_calls: 1
1922
+ # - selector: google.example.library.v1.LibraryService.UpdateBook
1923
+ # metric_costs:
1924
+ # library.googleapis.com/write_calls: 2
1925
+ # - selector: google.example.library.v1.LibraryService.DeleteBook
1926
+ # metric_costs:
1927
+ # library.googleapis.com/write_calls: 1
1928
+ # Corresponding Metric definition:
1929
+ # metrics:
1930
+ # - name: library.googleapis.com/read_calls
1931
+ # display_name: Read requests
1932
+ # metric_kind: DELTA
1933
+ # value_type: INT64
1934
+ # - name: library.googleapis.com/write_calls
1935
+ # display_name: Write requests
1936
+ # metric_kind: DELTA
1937
+ # value_type: INT64
1938
+ # Corresponds to the JSON property `quota`
1939
+ # @return [Google::Apis::ServiceusageV1::Quota]
1940
+ attr_accessor :quota
1941
+
1942
+ # The product title for this service.
1943
+ # Corresponds to the JSON property `title`
1944
+ # @return [String]
1945
+ attr_accessor :title
1946
+
1947
+ # Configuration controlling usage of a service.
1948
+ # Corresponds to the JSON property `usage`
1949
+ # @return [Google::Apis::ServiceusageV1::Usage]
1950
+ attr_accessor :usage
1951
+
1952
+ def initialize(**args)
1953
+ update!(**args)
1954
+ end
1955
+
1956
+ # Update properties of this object
1957
+ def update!(**args)
1958
+ @apis = args[:apis] if args.key?(:apis)
1959
+ @authentication = args[:authentication] if args.key?(:authentication)
1960
+ @documentation = args[:documentation] if args.key?(:documentation)
1961
+ @endpoints = args[:endpoints] if args.key?(:endpoints)
1962
+ @name = args[:name] if args.key?(:name)
1963
+ @quota = args[:quota] if args.key?(:quota)
1964
+ @title = args[:title] if args.key?(:title)
1965
+ @usage = args[:usage] if args.key?(:usage)
1966
+ end
1967
+ end
1968
+
1969
+ # The operation metadata returned for the batchend services operation.
1970
+ class GoogleApiServiceusageV1beta1OperationMetadata
1971
+ include Google::Apis::Core::Hashable
1972
+
1973
+ # The full name of the resources that this operation is directly
1974
+ # associated with.
1975
+ # Corresponds to the JSON property `resourceNames`
1976
+ # @return [Array<String>]
1977
+ attr_accessor :resource_names
1978
+
1979
+ def initialize(**args)
1980
+ update!(**args)
1981
+ end
1982
+
1983
+ # Update properties of this object
1984
+ def update!(**args)
1985
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
1986
+ end
1987
+ end
1988
+
1989
+ # Defines the HTTP configuration for an API service. It contains a list of
1990
+ # HttpRule, each specifying the mapping of an RPC method
1991
+ # to one or more HTTP REST API methods.
1992
+ class Http
1993
+ include Google::Apis::Core::Hashable
1994
+
1995
+ # When set to true, URL path parmeters will be fully URI-decoded except in
1996
+ # cases of single segment matches in reserved expansion, where "%2F" will be
1997
+ # left encoded.
1998
+ # The default behavior is to not decode RFC 6570 reserved characters in multi
1999
+ # segment matches.
2000
+ # Corresponds to the JSON property `fullyDecodeReservedExpansion`
2001
+ # @return [Boolean]
2002
+ attr_accessor :fully_decode_reserved_expansion
2003
+ alias_method :fully_decode_reserved_expansion?, :fully_decode_reserved_expansion
2004
+
2005
+ # A list of HTTP configuration rules that apply to individual API methods.
2006
+ # **NOTE:** All service configuration rules follow "last one wins" order.
2007
+ # Corresponds to the JSON property `rules`
2008
+ # @return [Array<Google::Apis::ServiceusageV1::HttpRule>]
2009
+ attr_accessor :rules
2010
+
2011
+ def initialize(**args)
2012
+ update!(**args)
2013
+ end
2014
+
2015
+ # Update properties of this object
2016
+ def update!(**args)
2017
+ @fully_decode_reserved_expansion = args[:fully_decode_reserved_expansion] if args.key?(:fully_decode_reserved_expansion)
2018
+ @rules = args[:rules] if args.key?(:rules)
2019
+ end
2020
+ end
2021
+
2022
+ # `HttpRule` defines the mapping of an RPC method to one or more HTTP
2023
+ # REST API methods. The mapping specifies how different portions of the RPC
2024
+ # request message are mapped to URL path, URL query parameters, and
2025
+ # HTTP request body. The mapping is typically specified as an
2026
+ # `google.api.http` annotation on the RPC method,
2027
+ # see "google/api/annotations.proto" for details.
2028
+ # The mapping consists of a field specifying the path template and
2029
+ # method kind. The path template can refer to fields in the request
2030
+ # message, as in the example below which describes a REST GET
2031
+ # operation on a resource collection of messages:
2032
+ # service Messaging `
2033
+ # rpc GetMessage(GetMessageRequest) returns (Message) `
2034
+ # option (google.api.http).get = "/v1/messages/`message_id`/`sub.
2035
+ # subfield`";
2036
+ # `
2037
+ # `
2038
+ # message GetMessageRequest `
2039
+ # message SubMessage `
2040
+ # string subfield = 1;
2041
+ # `
2042
+ # string message_id = 1; // mapped to the URL
2043
+ # SubMessage sub = 2; // `sub.subfield` is url-mapped
2044
+ # `
2045
+ # message Message `
2046
+ # string text = 1; // content of the resource
2047
+ # `
2048
+ # The same http annotation can alternatively be expressed inside the
2049
+ # `GRPC API Configuration` YAML file.
2050
+ # http:
2051
+ # rules:
2052
+ # - selector: <proto_package_name>.Messaging.GetMessage
2053
+ # get: /v1/messages/`message_id`/`sub.subfield`
2054
+ # This definition enables an automatic, bidrectional mapping of HTTP
2055
+ # JSON to RPC. Example:
2056
+ # HTTP | RPC
2057
+ # -----|-----
2058
+ # `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub:
2059
+ # SubMessage(subfield: "foo"))`
2060
+ # In general, not only fields but also field paths can be referenced
2061
+ # from a path pattern. Fields mapped to the path pattern cannot be
2062
+ # repeated and must have a primitive (non-message) type.
2063
+ # Any fields in the request message which are not bound by the path
2064
+ # pattern automatically become (optional) HTTP query
2065
+ # parameters. Assume the following definition of the request message:
2066
+ # service Messaging `
2067
+ # rpc GetMessage(GetMessageRequest) returns (Message) `
2068
+ # option (google.api.http).get = "/v1/messages/`message_id`";
2069
+ # `
2070
+ # `
2071
+ # message GetMessageRequest `
2072
+ # message SubMessage `
2073
+ # string subfield = 1;
2074
+ # `
2075
+ # string message_id = 1; // mapped to the URL
2076
+ # int64 revision = 2; // becomes a parameter
2077
+ # SubMessage sub = 3; // `sub.subfield` becomes a parameter
2078
+ # `
2079
+ # This enables a HTTP JSON to RPC mapping as below:
2080
+ # HTTP | RPC
2081
+ # -----|-----
2082
+ # `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id:
2083
+ # "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
2084
+ # Note that fields which are mapped to HTTP parameters must have a
2085
+ # primitive type or a repeated primitive type. Message types are not
2086
+ # allowed. In the case of a repeated type, the parameter can be
2087
+ # repeated in the URL, as in `...?param=A&param=B`.
2088
+ # For HTTP method kinds which allow a request body, the `body` field
2089
+ # specifies the mapping. Consider a REST update method on the
2090
+ # message resource collection:
2091
+ # service Messaging `
2092
+ # rpc UpdateMessage(UpdateMessageRequest) returns (Message) `
2093
+ # option (google.api.http) = `
2094
+ # put: "/v1/messages/`message_id`"
2095
+ # body: "message"
2096
+ # `;
2097
+ # `
2098
+ # `
2099
+ # message UpdateMessageRequest `
2100
+ # string message_id = 1; // mapped to the URL
2101
+ # Message message = 2; // mapped to the body
2102
+ # `
2103
+ # The following HTTP JSON to RPC mapping is enabled, where the
2104
+ # representation of the JSON in the request body is determined by
2105
+ # protos JSON encoding:
2106
+ # HTTP | RPC
2107
+ # -----|-----
2108
+ # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
2109
+ # 123456" message ` text: "Hi!" `)`
2110
+ # The special name `*` can be used in the body mapping to define that
2111
+ # every field not bound by the path template should be mapped to the
2112
+ # request body. This enables the following alternative definition of
2113
+ # the update method:
2114
+ # service Messaging `
2115
+ # rpc UpdateMessage(Message) returns (Message) `
2116
+ # option (google.api.http) = `
2117
+ # put: "/v1/messages/`message_id`"
2118
+ # body: "*"
2119
+ # `;
2120
+ # `
2121
+ # `
2122
+ # message Message `
2123
+ # string message_id = 1;
2124
+ # string text = 2;
2125
+ # `
2126
+ # The following HTTP JSON to RPC mapping is enabled:
2127
+ # HTTP | RPC
2128
+ # -----|-----
2129
+ # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: "
2130
+ # 123456" text: "Hi!")`
2131
+ # Note that when using `*` in the body mapping, it is not possible to
2132
+ # have HTTP parameters, as all fields not bound by the path end in
2133
+ # the body. This makes this option more rarely used in practice of
2134
+ # defining REST APIs. The common usage of `*` is in custom methods
2135
+ # which don't use the URL at all for transferring data.
2136
+ # It is possible to define multiple HTTP methods for one RPC by using
2137
+ # the `additional_bindings` option. Example:
2138
+ # service Messaging `
2139
+ # rpc GetMessage(GetMessageRequest) returns (Message) `
2140
+ # option (google.api.http) = `
2141
+ # get: "/v1/messages/`message_id`"
2142
+ # additional_bindings `
2143
+ # get: "/v1/users/`user_id`/messages/`message_id`"
2144
+ # `
2145
+ # `;
2146
+ # `
2147
+ # `
2148
+ # message GetMessageRequest `
2149
+ # string message_id = 1;
2150
+ # string user_id = 2;
2151
+ # `
2152
+ # This enables the following two alternative HTTP JSON to RPC
2153
+ # mappings:
2154
+ # HTTP | RPC
2155
+ # -----|-----
2156
+ # `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
2157
+ # `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "
2158
+ # 123456")`
2159
+ # # Rules for HTTP mapping
2160
+ # The rules for mapping HTTP path, query parameters, and body fields
2161
+ # to the request message are as follows:
2162
+ # 1. The `body` field specifies either `*` or a field path, or is
2163
+ # omitted. If omitted, it indicates there is no HTTP request body.
2164
+ # 2. Leaf fields (recursive expansion of nested messages in the
2165
+ # request) can be classified into three types:
2166
+ # (a) Matched in the URL template.
2167
+ # (b) Covered by body (if body is `*`, everything except (a) fields;
2168
+ # else everything under the body field)
2169
+ # (c) All other fields.
2170
+ # 3. URL query parameters found in the HTTP request are mapped to (c) fields.
2171
+ # 4. Any body sent with an HTTP request can contain only (b) fields.
2172
+ # The syntax of the path template is as follows:
2173
+ # Template = "/" Segments [ Verb ] ;
2174
+ # Segments = Segment ` "/" Segment ` ;
2175
+ # Segment = "*" | "**" | LITERAL | Variable ;
2176
+ # Variable = "`" FieldPath [ "=" Segments ] "`" ;
2177
+ # FieldPath = IDENT ` "." IDENT ` ;
2178
+ # Verb = ":" LITERAL ;
2179
+ # The syntax `*` matches a single path segment. The syntax `**` matches zero
2180
+ # or more path segments, which must be the last part of the path except the
2181
+ # `Verb`. The syntax `LITERAL` matches literal text in the path.
2182
+ # The syntax `Variable` matches part of the URL path as specified by its
2183
+ # template. A variable template must not contain other variables. If a variable
2184
+ # matches a single path segment, its template may be omitted, e.g. ``var``
2185
+ # is equivalent to ``var=*``.
2186
+ # If a variable contains exactly one path segment, such as `"`var`"` or
2187
+ # `"`var=*`"`, when such a variable is expanded into a URL path, all characters
2188
+ # except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
2189
+ # Discovery Document as ``var``.
2190
+ # If a variable contains one or more path segments, such as `"`var=foo/*`"`
2191
+ # or `"`var=**`"`, when such a variable is expanded into a URL path, all
2192
+ # characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
2193
+ # show up in the Discovery Document as ``+var``.
2194
+ # NOTE: While the single segment variable matches the semantics of
2195
+ # [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
2196
+ # Simple String Expansion, the multi segment variable **does not** match
2197
+ # RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
2198
+ # does not expand special characters like `?` and `#`, which would lead
2199
+ # to invalid URLs.
2200
+ # NOTE: the field paths in variables and in the `body` must not refer to
2201
+ # repeated fields or map fields.
2202
+ class HttpRule
2203
+ include Google::Apis::Core::Hashable
2204
+
2205
+ # Additional HTTP bindings for the selector. Nested bindings must
2206
+ # not contain an `additional_bindings` field themselves (that is,
2207
+ # the nesting may only be one level deep).
2208
+ # Corresponds to the JSON property `additionalBindings`
2209
+ # @return [Array<Google::Apis::ServiceusageV1::HttpRule>]
2210
+ attr_accessor :additional_bindings
2211
+
2212
+ # Specifies the permission(s) required for an API element for the overall
2213
+ # API request to succeed. It is typically used to mark request message fields
2214
+ # that contain the name of the resource and indicates the permissions that
2215
+ # will be checked on that resource.
2216
+ # Corresponds to the JSON property `authorizations`
2217
+ # @return [Array<Google::Apis::ServiceusageV1::AuthorizationRule>]
2218
+ attr_accessor :authorizations
2219
+
2220
+ # The name of the request field whose value is mapped to the HTTP body, or
2221
+ # `*` for mapping all fields not captured by the path pattern to the HTTP
2222
+ # body. NOTE: the referred field must not be a repeated field and must be
2223
+ # present at the top-level of request message type.
2224
+ # Corresponds to the JSON property `body`
2225
+ # @return [String]
2226
+ attr_accessor :body
2227
+
2228
+ # A custom pattern is used for defining custom HTTP verb.
2229
+ # Corresponds to the JSON property `custom`
2230
+ # @return [Google::Apis::ServiceusageV1::CustomHttpPattern]
2231
+ attr_accessor :custom
2232
+
2233
+ # Used for deleting a resource.
2234
+ # Corresponds to the JSON property `delete`
2235
+ # @return [String]
2236
+ attr_accessor :delete
2237
+
2238
+ # Used for listing and getting information about resources.
2239
+ # Corresponds to the JSON property `get`
2240
+ # @return [String]
2241
+ attr_accessor :get
2242
+
2243
+ # Defines the Media configuration for a service in case of a download.
2244
+ # Use this only for Scotty Requests. Do not use this for media support using
2245
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
2246
+ # your configuration for Bytestream methods.
2247
+ # Corresponds to the JSON property `mediaDownload`
2248
+ # @return [Google::Apis::ServiceusageV1::MediaDownload]
2249
+ attr_accessor :media_download
2250
+
2251
+ # Defines the Media configuration for a service in case of an upload.
2252
+ # Use this only for Scotty Requests. Do not use this for media support using
2253
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
2254
+ # your configuration for Bytestream methods.
2255
+ # Corresponds to the JSON property `mediaUpload`
2256
+ # @return [Google::Apis::ServiceusageV1::MediaUpload]
2257
+ attr_accessor :media_upload
2258
+
2259
+ # Used for updating a resource.
2260
+ # Corresponds to the JSON property `patch`
2261
+ # @return [String]
2262
+ attr_accessor :patch
2263
+
2264
+ # Used for creating a resource.
2265
+ # Corresponds to the JSON property `post`
2266
+ # @return [String]
2267
+ attr_accessor :post
2268
+
2269
+ # Used for updating a resource.
2270
+ # Corresponds to the JSON property `put`
2271
+ # @return [String]
2272
+ attr_accessor :put
2273
+
2274
+ # DO NOT USE. This is an experimental field.
2275
+ # Optional. The REST collection name is by default derived from the URL
2276
+ # pattern. If specified, this field overrides the default collection name.
2277
+ # Example:
2278
+ # rpc AddressesAggregatedList(AddressesAggregatedListRequest)
2279
+ # returns (AddressesAggregatedListResponse) `
2280
+ # option (google.api.http) = `
2281
+ # get: "/v1/projects/`project_id`/aggregated/addresses"
2282
+ # rest_collection: "projects.addresses"
2283
+ # `;
2284
+ # `
2285
+ # This method has the automatically derived collection name
2286
+ # "projects.aggregated". Because, semantically, this rpc is actually an
2287
+ # operation on the "projects.addresses" collection, the `rest_collection`
2288
+ # field is configured to override the derived collection name.
2289
+ # Corresponds to the JSON property `restCollection`
2290
+ # @return [String]
2291
+ attr_accessor :rest_collection
2292
+
2293
+ # DO NOT USE. This is an experimental field.
2294
+ # Optional. The rest method name is by default derived from the URL
2295
+ # pattern. If specified, this field overrides the default method name.
2296
+ # Example:
2297
+ # rpc CreateResource(CreateResourceRequest)
2298
+ # returns (CreateResourceResponse) `
2299
+ # option (google.api.http) = `
2300
+ # post: "/v1/resources",
2301
+ # body: "resource",
2302
+ # rest_method_name: "insert"
2303
+ # `;
2304
+ # `
2305
+ # This method has the automatically derived rest method name
2306
+ # "create", but for backwards compatibility with apiary, it is specified as
2307
+ # insert.
2308
+ # Corresponds to the JSON property `restMethodName`
2309
+ # @return [String]
2310
+ attr_accessor :rest_method_name
2311
+
2312
+ # Selects methods to which this rule applies.
2313
+ # Refer to selector for syntax details.
2314
+ # Corresponds to the JSON property `selector`
2315
+ # @return [String]
2316
+ attr_accessor :selector
2317
+
2318
+ def initialize(**args)
2319
+ update!(**args)
2320
+ end
2321
+
2322
+ # Update properties of this object
2323
+ def update!(**args)
2324
+ @additional_bindings = args[:additional_bindings] if args.key?(:additional_bindings)
2325
+ @authorizations = args[:authorizations] if args.key?(:authorizations)
2326
+ @body = args[:body] if args.key?(:body)
2327
+ @custom = args[:custom] if args.key?(:custom)
2328
+ @delete = args[:delete] if args.key?(:delete)
2329
+ @get = args[:get] if args.key?(:get)
2330
+ @media_download = args[:media_download] if args.key?(:media_download)
2331
+ @media_upload = args[:media_upload] if args.key?(:media_upload)
2332
+ @patch = args[:patch] if args.key?(:patch)
2333
+ @post = args[:post] if args.key?(:post)
2334
+ @put = args[:put] if args.key?(:put)
2335
+ @rest_collection = args[:rest_collection] if args.key?(:rest_collection)
2336
+ @rest_method_name = args[:rest_method_name] if args.key?(:rest_method_name)
2337
+ @selector = args[:selector] if args.key?(:selector)
2338
+ end
2339
+ end
2340
+
2341
+ # A description of a label.
2342
+ class LabelDescriptor
2343
+ include Google::Apis::Core::Hashable
2344
+
2345
+ # A human-readable description for the label.
2346
+ # Corresponds to the JSON property `description`
2347
+ # @return [String]
2348
+ attr_accessor :description
2349
+
2350
+ # The label key.
2351
+ # Corresponds to the JSON property `key`
2352
+ # @return [String]
2353
+ attr_accessor :key
2354
+
2355
+ # The type of data that can be assigned to the label.
2356
+ # Corresponds to the JSON property `valueType`
2357
+ # @return [String]
2358
+ attr_accessor :value_type
2359
+
2360
+ def initialize(**args)
2361
+ update!(**args)
2362
+ end
2363
+
2364
+ # Update properties of this object
2365
+ def update!(**args)
2366
+ @description = args[:description] if args.key?(:description)
2367
+ @key = args[:key] if args.key?(:key)
2368
+ @value_type = args[:value_type] if args.key?(:value_type)
2369
+ end
2370
+ end
2371
+
2372
+ # The response message for Operations.ListOperations.
2373
+ class ListOperationsResponse
2374
+ include Google::Apis::Core::Hashable
2375
+
2376
+ # The standard List next-page token.
2377
+ # Corresponds to the JSON property `nextPageToken`
2378
+ # @return [String]
2379
+ attr_accessor :next_page_token
2380
+
2381
+ # A list of operations that matches the specified filter in the request.
2382
+ # Corresponds to the JSON property `operations`
2383
+ # @return [Array<Google::Apis::ServiceusageV1::Operation>]
2384
+ attr_accessor :operations
2385
+
2386
+ def initialize(**args)
2387
+ update!(**args)
2388
+ end
2389
+
2390
+ # Update properties of this object
2391
+ def update!(**args)
2392
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2393
+ @operations = args[:operations] if args.key?(:operations)
2394
+ end
2395
+ end
2396
+
2397
+ # Response message for the `ListServices` method.
2398
+ class ListServicesResponse
2399
+ include Google::Apis::Core::Hashable
2400
+
2401
+ # Token that can be passed to `ListServices` to resume a paginated
2402
+ # query.
2403
+ # Corresponds to the JSON property `nextPageToken`
2404
+ # @return [String]
2405
+ attr_accessor :next_page_token
2406
+
2407
+ # The available services for the requested project.
2408
+ # Corresponds to the JSON property `services`
2409
+ # @return [Array<Google::Apis::ServiceusageV1::GoogleApiServiceusageV1Service>]
2410
+ attr_accessor :services
2411
+
2412
+ def initialize(**args)
2413
+ update!(**args)
2414
+ end
2415
+
2416
+ # Update properties of this object
2417
+ def update!(**args)
2418
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2419
+ @services = args[:services] if args.key?(:services)
2420
+ end
2421
+ end
2422
+
2423
+ # A description of a log type. Example in YAML format:
2424
+ # - name: library.googleapis.com/activity_history
2425
+ # description: The history of borrowing and returning library items.
2426
+ # display_name: Activity
2427
+ # labels:
2428
+ # - key: /customer_id
2429
+ # description: Identifier of a library customer
2430
+ class LogDescriptor
2431
+ include Google::Apis::Core::Hashable
2432
+
2433
+ # A human-readable description of this log. This information appears in
2434
+ # the documentation and can contain details.
2435
+ # Corresponds to the JSON property `description`
2436
+ # @return [String]
2437
+ attr_accessor :description
2438
+
2439
+ # The human-readable name for this log. This information appears on
2440
+ # the user interface and should be concise.
2441
+ # Corresponds to the JSON property `displayName`
2442
+ # @return [String]
2443
+ attr_accessor :display_name
2444
+
2445
+ # The set of labels that are available to describe a specific log entry.
2446
+ # Runtime requests that contain labels not specified here are
2447
+ # considered invalid.
2448
+ # Corresponds to the JSON property `labels`
2449
+ # @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
2450
+ attr_accessor :labels
2451
+
2452
+ # The name of the log. It must be less than 512 characters long and can
2453
+ # include the following characters: upper- and lower-case alphanumeric
2454
+ # characters [A-Za-z0-9], and punctuation characters including
2455
+ # slash, underscore, hyphen, period [/_-.].
2456
+ # Corresponds to the JSON property `name`
2457
+ # @return [String]
2458
+ attr_accessor :name
2459
+
2460
+ def initialize(**args)
2461
+ update!(**args)
2462
+ end
2463
+
2464
+ # Update properties of this object
2465
+ def update!(**args)
2466
+ @description = args[:description] if args.key?(:description)
2467
+ @display_name = args[:display_name] if args.key?(:display_name)
2468
+ @labels = args[:labels] if args.key?(:labels)
2469
+ @name = args[:name] if args.key?(:name)
2470
+ end
2471
+ end
2472
+
2473
+ # Logging configuration of the service.
2474
+ # The following example shows how to configure logs to be sent to the
2475
+ # producer and consumer projects. In the example, the `activity_history`
2476
+ # log is sent to both the producer and consumer projects, whereas the
2477
+ # `purchase_history` log is only sent to the producer project.
2478
+ # monitored_resources:
2479
+ # - type: library.googleapis.com/branch
2480
+ # labels:
2481
+ # - key: /city
2482
+ # description: The city where the library branch is located in.
2483
+ # - key: /name
2484
+ # description: The name of the branch.
2485
+ # logs:
2486
+ # - name: activity_history
2487
+ # labels:
2488
+ # - key: /customer_id
2489
+ # - name: purchase_history
2490
+ # logging:
2491
+ # producer_destinations:
2492
+ # - monitored_resource: library.googleapis.com/branch
2493
+ # logs:
2494
+ # - activity_history
2495
+ # - purchase_history
2496
+ # consumer_destinations:
2497
+ # - monitored_resource: library.googleapis.com/branch
2498
+ # logs:
2499
+ # - activity_history
2500
+ class Logging
2501
+ include Google::Apis::Core::Hashable
2502
+
2503
+ # Logging configurations for sending logs to the consumer project.
2504
+ # There can be multiple consumer destinations, each one must have a
2505
+ # different monitored resource type. A log can be used in at most
2506
+ # one consumer destination.
2507
+ # Corresponds to the JSON property `consumerDestinations`
2508
+ # @return [Array<Google::Apis::ServiceusageV1::LoggingDestination>]
2509
+ attr_accessor :consumer_destinations
2510
+
2511
+ # Logging configurations for sending logs to the producer project.
2512
+ # There can be multiple producer destinations, each one must have a
2513
+ # different monitored resource type. A log can be used in at most
2514
+ # one producer destination.
2515
+ # Corresponds to the JSON property `producerDestinations`
2516
+ # @return [Array<Google::Apis::ServiceusageV1::LoggingDestination>]
2517
+ attr_accessor :producer_destinations
2518
+
2519
+ def initialize(**args)
2520
+ update!(**args)
2521
+ end
2522
+
2523
+ # Update properties of this object
2524
+ def update!(**args)
2525
+ @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
2526
+ @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations)
2527
+ end
2528
+ end
2529
+
2530
+ # Configuration of a specific logging destination (the producer project
2531
+ # or the consumer project).
2532
+ class LoggingDestination
2533
+ include Google::Apis::Core::Hashable
2534
+
2535
+ # Names of the logs to be sent to this destination. Each name must
2536
+ # be defined in the Service.logs section. If the log name is
2537
+ # not a domain scoped name, it will be automatically prefixed with
2538
+ # the service name followed by "/".
2539
+ # Corresponds to the JSON property `logs`
2540
+ # @return [Array<String>]
2541
+ attr_accessor :logs
2542
+
2543
+ # The monitored resource type. The type must be defined in the
2544
+ # Service.monitored_resources section.
2545
+ # Corresponds to the JSON property `monitoredResource`
2546
+ # @return [String]
2547
+ attr_accessor :monitored_resource
2548
+
2549
+ def initialize(**args)
2550
+ update!(**args)
2551
+ end
2552
+
2553
+ # Update properties of this object
2554
+ def update!(**args)
2555
+ @logs = args[:logs] if args.key?(:logs)
2556
+ @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
2557
+ end
2558
+ end
2559
+
2560
+ # Defines the Media configuration for a service in case of a download.
2561
+ # Use this only for Scotty Requests. Do not use this for media support using
2562
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
2563
+ # your configuration for Bytestream methods.
2564
+ class MediaDownload
2565
+ include Google::Apis::Core::Hashable
2566
+
2567
+ # A boolean that determines whether a notification for the completion of a
2568
+ # download should be sent to the backend.
2569
+ # Corresponds to the JSON property `completeNotification`
2570
+ # @return [Boolean]
2571
+ attr_accessor :complete_notification
2572
+ alias_method :complete_notification?, :complete_notification
2573
+
2574
+ # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.
2575
+ # Specify name of the download service if one is used for download.
2576
+ # Corresponds to the JSON property `downloadService`
2577
+ # @return [String]
2578
+ attr_accessor :download_service
2579
+
2580
+ # Name of the Scotty dropzone to use for the current API.
2581
+ # Corresponds to the JSON property `dropzone`
2582
+ # @return [String]
2583
+ attr_accessor :dropzone
2584
+
2585
+ # Whether download is enabled.
2586
+ # Corresponds to the JSON property `enabled`
2587
+ # @return [Boolean]
2588
+ attr_accessor :enabled
2589
+ alias_method :enabled?, :enabled
2590
+
2591
+ # Optional maximum acceptable size for direct download.
2592
+ # The size is specified in bytes.
2593
+ # Corresponds to the JSON property `maxDirectDownloadSize`
2594
+ # @return [Fixnum]
2595
+ attr_accessor :max_direct_download_size
2596
+
2597
+ # A boolean that determines if direct download from ESF should be used for
2598
+ # download of this media.
2599
+ # Corresponds to the JSON property `useDirectDownload`
2600
+ # @return [Boolean]
2601
+ attr_accessor :use_direct_download
2602
+ alias_method :use_direct_download?, :use_direct_download
2603
+
2604
+ def initialize(**args)
2605
+ update!(**args)
2606
+ end
2607
+
2608
+ # Update properties of this object
2609
+ def update!(**args)
2610
+ @complete_notification = args[:complete_notification] if args.key?(:complete_notification)
2611
+ @download_service = args[:download_service] if args.key?(:download_service)
2612
+ @dropzone = args[:dropzone] if args.key?(:dropzone)
2613
+ @enabled = args[:enabled] if args.key?(:enabled)
2614
+ @max_direct_download_size = args[:max_direct_download_size] if args.key?(:max_direct_download_size)
2615
+ @use_direct_download = args[:use_direct_download] if args.key?(:use_direct_download)
2616
+ end
2617
+ end
2618
+
2619
+ # Defines the Media configuration for a service in case of an upload.
2620
+ # Use this only for Scotty Requests. Do not use this for media support using
2621
+ # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to
2622
+ # your configuration for Bytestream methods.
2623
+ class MediaUpload
2624
+ include Google::Apis::Core::Hashable
2625
+
2626
+ # A boolean that determines whether a notification for the completion of an
2627
+ # upload should be sent to the backend. These notifications will not be seen
2628
+ # by the client and will not consume quota.
2629
+ # Corresponds to the JSON property `completeNotification`
2630
+ # @return [Boolean]
2631
+ attr_accessor :complete_notification
2632
+ alias_method :complete_notification?, :complete_notification
2633
+
2634
+ # Name of the Scotty dropzone to use for the current API.
2635
+ # Corresponds to the JSON property `dropzone`
2636
+ # @return [String]
2637
+ attr_accessor :dropzone
2638
+
2639
+ # Whether upload is enabled.
2640
+ # Corresponds to the JSON property `enabled`
2641
+ # @return [Boolean]
2642
+ attr_accessor :enabled
2643
+ alias_method :enabled?, :enabled
2644
+
2645
+ # Optional maximum acceptable size for an upload.
2646
+ # The size is specified in bytes.
2647
+ # Corresponds to the JSON property `maxSize`
2648
+ # @return [Fixnum]
2649
+ attr_accessor :max_size
2650
+
2651
+ # An array of mimetype patterns. Esf will only accept uploads that match one
2652
+ # of the given patterns.
2653
+ # Corresponds to the JSON property `mimeTypes`
2654
+ # @return [Array<String>]
2655
+ attr_accessor :mime_types
2656
+
2657
+ # Whether to receive a notification for progress changes of media upload.
2658
+ # Corresponds to the JSON property `progressNotification`
2659
+ # @return [Boolean]
2660
+ attr_accessor :progress_notification
2661
+ alias_method :progress_notification?, :progress_notification
2662
+
2663
+ # Whether to receive a notification on the start of media upload.
2664
+ # Corresponds to the JSON property `startNotification`
2665
+ # @return [Boolean]
2666
+ attr_accessor :start_notification
2667
+ alias_method :start_notification?, :start_notification
2668
+
2669
+ # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.
2670
+ # Specify name of the upload service if one is used for upload.
2671
+ # Corresponds to the JSON property `uploadService`
2672
+ # @return [String]
2673
+ attr_accessor :upload_service
2674
+
2675
+ def initialize(**args)
2676
+ update!(**args)
2677
+ end
2678
+
2679
+ # Update properties of this object
2680
+ def update!(**args)
2681
+ @complete_notification = args[:complete_notification] if args.key?(:complete_notification)
2682
+ @dropzone = args[:dropzone] if args.key?(:dropzone)
2683
+ @enabled = args[:enabled] if args.key?(:enabled)
2684
+ @max_size = args[:max_size] if args.key?(:max_size)
2685
+ @mime_types = args[:mime_types] if args.key?(:mime_types)
2686
+ @progress_notification = args[:progress_notification] if args.key?(:progress_notification)
2687
+ @start_notification = args[:start_notification] if args.key?(:start_notification)
2688
+ @upload_service = args[:upload_service] if args.key?(:upload_service)
2689
+ end
2690
+ end
2691
+
2692
+ # Method represents a method of an API interface.
2693
+ class MethodProp
2694
+ include Google::Apis::Core::Hashable
2695
+
2696
+ # The simple name of this method.
2697
+ # Corresponds to the JSON property `name`
2698
+ # @return [String]
2699
+ attr_accessor :name
2700
+
2701
+ # Any metadata attached to the method.
2702
+ # Corresponds to the JSON property `options`
2703
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
2704
+ attr_accessor :options
2705
+
2706
+ # If true, the request is streamed.
2707
+ # Corresponds to the JSON property `requestStreaming`
2708
+ # @return [Boolean]
2709
+ attr_accessor :request_streaming
2710
+ alias_method :request_streaming?, :request_streaming
2711
+
2712
+ # A URL of the input message type.
2713
+ # Corresponds to the JSON property `requestTypeUrl`
2714
+ # @return [String]
2715
+ attr_accessor :request_type_url
2716
+
2717
+ # If true, the response is streamed.
2718
+ # Corresponds to the JSON property `responseStreaming`
2719
+ # @return [Boolean]
2720
+ attr_accessor :response_streaming
2721
+ alias_method :response_streaming?, :response_streaming
2722
+
2723
+ # The URL of the output message type.
2724
+ # Corresponds to the JSON property `responseTypeUrl`
2725
+ # @return [String]
2726
+ attr_accessor :response_type_url
2727
+
2728
+ # The source syntax of this method.
2729
+ # Corresponds to the JSON property `syntax`
2730
+ # @return [String]
2731
+ attr_accessor :syntax
2732
+
2733
+ def initialize(**args)
2734
+ update!(**args)
2735
+ end
2736
+
2737
+ # Update properties of this object
2738
+ def update!(**args)
2739
+ @name = args[:name] if args.key?(:name)
2740
+ @options = args[:options] if args.key?(:options)
2741
+ @request_streaming = args[:request_streaming] if args.key?(:request_streaming)
2742
+ @request_type_url = args[:request_type_url] if args.key?(:request_type_url)
2743
+ @response_streaming = args[:response_streaming] if args.key?(:response_streaming)
2744
+ @response_type_url = args[:response_type_url] if args.key?(:response_type_url)
2745
+ @syntax = args[:syntax] if args.key?(:syntax)
2746
+ end
2747
+ end
2748
+
2749
+ # Defines a metric type and its schema. Once a metric descriptor is created,
2750
+ # deleting or altering it stops data collection and makes the metric type's
2751
+ # existing data unusable.
2752
+ class MetricDescriptor
2753
+ include Google::Apis::Core::Hashable
2754
+
2755
+ # A detailed description of the metric, which can be used in documentation.
2756
+ # Corresponds to the JSON property `description`
2757
+ # @return [String]
2758
+ attr_accessor :description
2759
+
2760
+ # A concise name for the metric, which can be displayed in user interfaces.
2761
+ # Use sentence case without an ending period, for example "Request count".
2762
+ # This field is optional but it is recommended to be set for any metrics
2763
+ # associated with user-visible concepts, such as Quota.
2764
+ # Corresponds to the JSON property `displayName`
2765
+ # @return [String]
2766
+ attr_accessor :display_name
2767
+
2768
+ # The set of labels that can be used to describe a specific
2769
+ # instance of this metric type. For example, the
2770
+ # `appengine.googleapis.com/http/server/response_latencies` metric
2771
+ # type has a label for the HTTP response code, `response_code`, so
2772
+ # you can look at latencies for successful responses or just
2773
+ # for responses that failed.
2774
+ # Corresponds to the JSON property `labels`
2775
+ # @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
2776
+ attr_accessor :labels
2777
+
2778
+ # Additional annotations that can be used to guide the usage of a metric.
2779
+ # Corresponds to the JSON property `metadata`
2780
+ # @return [Google::Apis::ServiceusageV1::MetricDescriptorMetadata]
2781
+ attr_accessor :metadata
2782
+
2783
+ # Whether the metric records instantaneous values, changes to a value, etc.
2784
+ # Some combinations of `metric_kind` and `value_type` might not be supported.
2785
+ # Corresponds to the JSON property `metricKind`
2786
+ # @return [String]
2787
+ attr_accessor :metric_kind
2788
+
2789
+ # The resource name of the metric descriptor.
2790
+ # Corresponds to the JSON property `name`
2791
+ # @return [String]
2792
+ attr_accessor :name
2793
+
2794
+ # The metric type, including its DNS name prefix. The type is not
2795
+ # URL-encoded. All user-defined custom metric types have the DNS name
2796
+ # `custom.googleapis.com`. Metric types should use a natural hierarchical
2797
+ # grouping. For example:
2798
+ # "custom.googleapis.com/invoice/paid/amount"
2799
+ # "appengine.googleapis.com/http/server/response_latencies"
2800
+ # Corresponds to the JSON property `type`
2801
+ # @return [String]
2802
+ attr_accessor :type
2803
+
2804
+ # The unit in which the metric value is reported. It is only applicable
2805
+ # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The
2806
+ # supported units are a subset of [The Unified Code for Units of
2807
+ # Measure](http://unitsofmeasure.org/ucum.html) standard:
2808
+ # **Basic units (UNIT)**
2809
+ # * `bit` bit
2810
+ # * `By` byte
2811
+ # * `s` second
2812
+ # * `min` minute
2813
+ # * `h` hour
2814
+ # * `d` day
2815
+ # **Prefixes (PREFIX)**
2816
+ # * `k` kilo (10**3)
2817
+ # * `M` mega (10**6)
2818
+ # * `G` giga (10**9)
2819
+ # * `T` tera (10**12)
2820
+ # * `P` peta (10**15)
2821
+ # * `E` exa (10**18)
2822
+ # * `Z` zetta (10**21)
2823
+ # * `Y` yotta (10**24)
2824
+ # * `m` milli (10**-3)
2825
+ # * `u` micro (10**-6)
2826
+ # * `n` nano (10**-9)
2827
+ # * `p` pico (10**-12)
2828
+ # * `f` femto (10**-15)
2829
+ # * `a` atto (10**-18)
2830
+ # * `z` zepto (10**-21)
2831
+ # * `y` yocto (10**-24)
2832
+ # * `Ki` kibi (2**10)
2833
+ # * `Mi` mebi (2**20)
2834
+ # * `Gi` gibi (2**30)
2835
+ # * `Ti` tebi (2**40)
2836
+ # **Grammar**
2837
+ # The grammar also includes these connectors:
2838
+ # * `/` division (as an infix operator, e.g. `1/s`).
2839
+ # * `.` multiplication (as an infix operator, e.g. `GBy.d`)
2840
+ # The grammar for a unit is as follows:
2841
+ # Expression = Component ` "." Component ` ` "/" Component ` ;
2842
+ # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
2843
+ # | Annotation
2844
+ # | "1"
2845
+ # ;
2846
+ # Annotation = "`" NAME "`" ;
2847
+ # Notes:
2848
+ # * `Annotation` is just a comment if it follows a `UNIT` and is
2849
+ # equivalent to `1` if it is used alone. For examples,
2850
+ # ``requests`/s == 1/s`, `By`transmitted`/s == By/s`.
2851
+ # * `NAME` is a sequence of non-blank printable ASCII characters not
2852
+ # containing '`' or '`'.
2853
+ # * `1` represents dimensionless value 1, such as in `1/s`.
2854
+ # * `%` represents dimensionless value 1/100, and annotates values giving
2855
+ # a percentage.
2856
+ # Corresponds to the JSON property `unit`
2857
+ # @return [String]
2858
+ attr_accessor :unit
2859
+
2860
+ # Whether the measurement is an integer, a floating-point number, etc.
2861
+ # Some combinations of `metric_kind` and `value_type` might not be supported.
2862
+ # Corresponds to the JSON property `valueType`
2863
+ # @return [String]
2864
+ attr_accessor :value_type
2865
+
2866
+ def initialize(**args)
2867
+ update!(**args)
2868
+ end
2869
+
2870
+ # Update properties of this object
2871
+ def update!(**args)
2872
+ @description = args[:description] if args.key?(:description)
2873
+ @display_name = args[:display_name] if args.key?(:display_name)
2874
+ @labels = args[:labels] if args.key?(:labels)
2875
+ @metadata = args[:metadata] if args.key?(:metadata)
2876
+ @metric_kind = args[:metric_kind] if args.key?(:metric_kind)
2877
+ @name = args[:name] if args.key?(:name)
2878
+ @type = args[:type] if args.key?(:type)
2879
+ @unit = args[:unit] if args.key?(:unit)
2880
+ @value_type = args[:value_type] if args.key?(:value_type)
2881
+ end
2882
+ end
2883
+
2884
+ # Additional annotations that can be used to guide the usage of a metric.
2885
+ class MetricDescriptorMetadata
2886
+ include Google::Apis::Core::Hashable
2887
+
2888
+ # The delay of data points caused by ingestion. Data points older than this
2889
+ # age are guaranteed to be ingested and available to be read, excluding
2890
+ # data loss due to errors.
2891
+ # Corresponds to the JSON property `ingestDelay`
2892
+ # @return [String]
2893
+ attr_accessor :ingest_delay
2894
+
2895
+ # The launch stage of the metric definition.
2896
+ # Corresponds to the JSON property `launchStage`
2897
+ # @return [String]
2898
+ attr_accessor :launch_stage
2899
+
2900
+ # The sampling period of metric data points. For metrics which are written
2901
+ # periodically, consecutive data points are stored at this time interval,
2902
+ # excluding data loss due to errors. Metrics with a higher granularity have
2903
+ # a smaller sampling period.
2904
+ # Corresponds to the JSON property `samplePeriod`
2905
+ # @return [String]
2906
+ attr_accessor :sample_period
2907
+
2908
+ def initialize(**args)
2909
+ update!(**args)
2910
+ end
2911
+
2912
+ # Update properties of this object
2913
+ def update!(**args)
2914
+ @ingest_delay = args[:ingest_delay] if args.key?(:ingest_delay)
2915
+ @launch_stage = args[:launch_stage] if args.key?(:launch_stage)
2916
+ @sample_period = args[:sample_period] if args.key?(:sample_period)
2917
+ end
2918
+ end
2919
+
2920
+ # Bind API methods to metrics. Binding a method to a metric causes that
2921
+ # metric's configured quota behaviors to apply to the method call.
2922
+ class MetricRule
2923
+ include Google::Apis::Core::Hashable
2924
+
2925
+ # Metrics to update when the selected methods are called, and the associated
2926
+ # cost applied to each metric.
2927
+ # The key of the map is the metric name, and the values are the amount
2928
+ # increased for the metric against which the quota limits are defined.
2929
+ # The value must not be negative.
2930
+ # Corresponds to the JSON property `metricCosts`
2931
+ # @return [Hash<String,Fixnum>]
2932
+ attr_accessor :metric_costs
2933
+
2934
+ # Selects the methods to which this rule applies.
2935
+ # Refer to selector for syntax details.
2936
+ # Corresponds to the JSON property `selector`
2937
+ # @return [String]
2938
+ attr_accessor :selector
2939
+
2940
+ def initialize(**args)
2941
+ update!(**args)
2942
+ end
2943
+
2944
+ # Update properties of this object
2945
+ def update!(**args)
2946
+ @metric_costs = args[:metric_costs] if args.key?(:metric_costs)
2947
+ @selector = args[:selector] if args.key?(:selector)
2948
+ end
2949
+ end
2950
+
2951
+ # Declares an API Interface to be included in this interface. The including
2952
+ # interface must redeclare all the methods from the included interface, but
2953
+ # documentation and options are inherited as follows:
2954
+ # - If after comment and whitespace stripping, the documentation
2955
+ # string of the redeclared method is empty, it will be inherited
2956
+ # from the original method.
2957
+ # - Each annotation belonging to the service config (http,
2958
+ # visibility) which is not set in the redeclared method will be
2959
+ # inherited.
2960
+ # - If an http annotation is inherited, the path pattern will be
2961
+ # modified as follows. Any version prefix will be replaced by the
2962
+ # version of the including interface plus the root path if
2963
+ # specified.
2964
+ # Example of a simple mixin:
2965
+ # package google.acl.v1;
2966
+ # service AccessControl `
2967
+ # // Get the underlying ACL object.
2968
+ # rpc GetAcl(GetAclRequest) returns (Acl) `
2969
+ # option (google.api.http).get = "/v1/`resource=**`:getAcl";
2970
+ # `
2971
+ # `
2972
+ # package google.storage.v2;
2973
+ # service Storage `
2974
+ # // rpc GetAcl(GetAclRequest) returns (Acl);
2975
+ # // Get a data record.
2976
+ # rpc GetData(GetDataRequest) returns (Data) `
2977
+ # option (google.api.http).get = "/v2/`resource=**`";
2978
+ # `
2979
+ # `
2980
+ # Example of a mixin configuration:
2981
+ # apis:
2982
+ # - name: google.storage.v2.Storage
2983
+ # mixins:
2984
+ # - name: google.acl.v1.AccessControl
2985
+ # The mixin construct implies that all methods in `AccessControl` are
2986
+ # also declared with same name and request/response types in
2987
+ # `Storage`. A documentation generator or annotation processor will
2988
+ # see the effective `Storage.GetAcl` method after inherting
2989
+ # documentation and annotations as follows:
2990
+ # service Storage `
2991
+ # // Get the underlying ACL object.
2992
+ # rpc GetAcl(GetAclRequest) returns (Acl) `
2993
+ # option (google.api.http).get = "/v2/`resource=**`:getAcl";
2994
+ # `
2995
+ # ...
2996
+ # `
2997
+ # Note how the version in the path pattern changed from `v1` to `v2`.
2998
+ # If the `root` field in the mixin is specified, it should be a
2999
+ # relative path under which inherited HTTP paths are placed. Example:
3000
+ # apis:
3001
+ # - name: google.storage.v2.Storage
3002
+ # mixins:
3003
+ # - name: google.acl.v1.AccessControl
3004
+ # root: acls
3005
+ # This implies the following inherited HTTP annotation:
3006
+ # service Storage `
3007
+ # // Get the underlying ACL object.
3008
+ # rpc GetAcl(GetAclRequest) returns (Acl) `
3009
+ # option (google.api.http).get = "/v2/acls/`resource=**`:getAcl";
3010
+ # `
3011
+ # ...
3012
+ # `
3013
+ class Mixin
3014
+ include Google::Apis::Core::Hashable
3015
+
3016
+ # The fully qualified name of the interface which is included.
3017
+ # Corresponds to the JSON property `name`
3018
+ # @return [String]
3019
+ attr_accessor :name
3020
+
3021
+ # If non-empty specifies a path under which inherited HTTP paths
3022
+ # are rooted.
3023
+ # Corresponds to the JSON property `root`
3024
+ # @return [String]
3025
+ attr_accessor :root
3026
+
3027
+ def initialize(**args)
3028
+ update!(**args)
3029
+ end
3030
+
3031
+ # Update properties of this object
3032
+ def update!(**args)
3033
+ @name = args[:name] if args.key?(:name)
3034
+ @root = args[:root] if args.key?(:root)
3035
+ end
3036
+ end
3037
+
3038
+ # An object that describes the schema of a MonitoredResource object using a
3039
+ # type name and a set of labels. For example, the monitored resource
3040
+ # descriptor for Google Compute Engine VM instances has a type of
3041
+ # `"gce_instance"` and specifies the use of the labels `"instance_id"` and
3042
+ # `"zone"` to identify particular VM instances.
3043
+ # Different APIs can support different monitored resource types. APIs generally
3044
+ # provide a `list` method that returns the monitored resource descriptors used
3045
+ # by the API.
3046
+ class MonitoredResourceDescriptor
3047
+ include Google::Apis::Core::Hashable
3048
+
3049
+ # Optional. A detailed description of the monitored resource type that might
3050
+ # be used in documentation.
3051
+ # Corresponds to the JSON property `description`
3052
+ # @return [String]
3053
+ attr_accessor :description
3054
+
3055
+ # Optional. A concise name for the monitored resource type that might be
3056
+ # displayed in user interfaces. It should be a Title Cased Noun Phrase,
3057
+ # without any article or other determiners. For example,
3058
+ # `"Google Cloud SQL Database"`.
3059
+ # Corresponds to the JSON property `displayName`
3060
+ # @return [String]
3061
+ attr_accessor :display_name
3062
+
3063
+ # Required. A set of labels used to describe instances of this monitored
3064
+ # resource type. For example, an individual Google Cloud SQL database is
3065
+ # identified by values for the labels `"database_id"` and `"zone"`.
3066
+ # Corresponds to the JSON property `labels`
3067
+ # @return [Array<Google::Apis::ServiceusageV1::LabelDescriptor>]
3068
+ attr_accessor :labels
3069
+
3070
+ # Optional. The resource name of the monitored resource descriptor:
3071
+ # `"projects/`project_id`/monitoredResourceDescriptors/`type`"` where
3072
+ # `type` is the value of the `type` field in this object and
3073
+ # `project_id` is a project ID that provides API-specific context for
3074
+ # accessing the type. APIs that do not use project information can use the
3075
+ # resource name format `"monitoredResourceDescriptors/`type`"`.
3076
+ # Corresponds to the JSON property `name`
3077
+ # @return [String]
3078
+ attr_accessor :name
3079
+
3080
+ # Required. The monitored resource type. For example, the type
3081
+ # `"cloudsql_database"` represents databases in Google Cloud SQL.
3082
+ # The maximum length of this value is 256 characters.
3083
+ # Corresponds to the JSON property `type`
3084
+ # @return [String]
3085
+ attr_accessor :type
3086
+
3087
+ def initialize(**args)
3088
+ update!(**args)
3089
+ end
3090
+
3091
+ # Update properties of this object
3092
+ def update!(**args)
3093
+ @description = args[:description] if args.key?(:description)
3094
+ @display_name = args[:display_name] if args.key?(:display_name)
3095
+ @labels = args[:labels] if args.key?(:labels)
3096
+ @name = args[:name] if args.key?(:name)
3097
+ @type = args[:type] if args.key?(:type)
3098
+ end
3099
+ end
3100
+
3101
+ # Monitoring configuration of the service.
3102
+ # The example below shows how to configure monitored resources and metrics
3103
+ # for monitoring. In the example, a monitored resource and two metrics are
3104
+ # defined. The `library.googleapis.com/book/returned_count` metric is sent
3105
+ # to both producer and consumer projects, whereas the
3106
+ # `library.googleapis.com/book/overdue_count` metric is only sent to the
3107
+ # consumer project.
3108
+ # monitored_resources:
3109
+ # - type: library.googleapis.com/branch
3110
+ # labels:
3111
+ # - key: /city
3112
+ # description: The city where the library branch is located in.
3113
+ # - key: /name
3114
+ # description: The name of the branch.
3115
+ # metrics:
3116
+ # - name: library.googleapis.com/book/returned_count
3117
+ # metric_kind: DELTA
3118
+ # value_type: INT64
3119
+ # labels:
3120
+ # - key: /customer_id
3121
+ # - name: library.googleapis.com/book/overdue_count
3122
+ # metric_kind: GAUGE
3123
+ # value_type: INT64
3124
+ # labels:
3125
+ # - key: /customer_id
3126
+ # monitoring:
3127
+ # producer_destinations:
3128
+ # - monitored_resource: library.googleapis.com/branch
3129
+ # metrics:
3130
+ # - library.googleapis.com/book/returned_count
3131
+ # consumer_destinations:
3132
+ # - monitored_resource: library.googleapis.com/branch
3133
+ # metrics:
3134
+ # - library.googleapis.com/book/returned_count
3135
+ # - library.googleapis.com/book/overdue_count
3136
+ class Monitoring
3137
+ include Google::Apis::Core::Hashable
3138
+
3139
+ # Monitoring configurations for sending metrics to the consumer project.
3140
+ # There can be multiple consumer destinations, each one must have a
3141
+ # different monitored resource type. A metric can be used in at most
3142
+ # one consumer destination.
3143
+ # Corresponds to the JSON property `consumerDestinations`
3144
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoringDestination>]
3145
+ attr_accessor :consumer_destinations
3146
+
3147
+ # Monitoring configurations for sending metrics to the producer project.
3148
+ # There can be multiple producer destinations, each one must have a
3149
+ # different monitored resource type. A metric can be used in at most
3150
+ # one producer destination.
3151
+ # Corresponds to the JSON property `producerDestinations`
3152
+ # @return [Array<Google::Apis::ServiceusageV1::MonitoringDestination>]
3153
+ attr_accessor :producer_destinations
3154
+
3155
+ def initialize(**args)
3156
+ update!(**args)
3157
+ end
3158
+
3159
+ # Update properties of this object
3160
+ def update!(**args)
3161
+ @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations)
3162
+ @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations)
3163
+ end
3164
+ end
3165
+
3166
+ # Configuration of a specific monitoring destination (the producer project
3167
+ # or the consumer project).
3168
+ class MonitoringDestination
3169
+ include Google::Apis::Core::Hashable
3170
+
3171
+ # Names of the metrics to report to this monitoring destination.
3172
+ # Each name must be defined in Service.metrics section.
3173
+ # Corresponds to the JSON property `metrics`
3174
+ # @return [Array<String>]
3175
+ attr_accessor :metrics
3176
+
3177
+ # The monitored resource type. The type must be defined in
3178
+ # Service.monitored_resources section.
3179
+ # Corresponds to the JSON property `monitoredResource`
3180
+ # @return [String]
3181
+ attr_accessor :monitored_resource
3182
+
3183
+ def initialize(**args)
3184
+ update!(**args)
3185
+ end
3186
+
3187
+ # Update properties of this object
3188
+ def update!(**args)
3189
+ @metrics = args[:metrics] if args.key?(:metrics)
3190
+ @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource)
3191
+ end
3192
+ end
3193
+
3194
+ # OAuth scopes are a way to define data and permissions on data. For example,
3195
+ # there are scopes defined for "Read-only access to Google Calendar" and
3196
+ # "Access to Cloud Platform". Users can consent to a scope for an application,
3197
+ # giving it permission to access that data on their behalf.
3198
+ # OAuth scope specifications should be fairly coarse grained; a user will need
3199
+ # to see and understand the text description of what your scope means.
3200
+ # In most cases: use one or at most two OAuth scopes for an entire family of
3201
+ # products. If your product has multiple APIs, you should probably be sharing
3202
+ # the OAuth scope across all of those APIs.
3203
+ # When you need finer grained OAuth consent screens: talk with your product
3204
+ # management about how developers will use them in practice.
3205
+ # Please note that even though each of the canonical scopes is enough for a
3206
+ # request to be accepted and passed to the backend, a request can still fail
3207
+ # due to the backend requiring additional scopes or permissions.
3208
+ class OAuthRequirements
3209
+ include Google::Apis::Core::Hashable
3210
+
3211
+ # The list of publicly documented OAuth scopes that are allowed access. An
3212
+ # OAuth token containing any of these scopes will be accepted.
3213
+ # Example:
3214
+ # canonical_scopes: https://www.googleapis.com/auth/calendar,
3215
+ # https://www.googleapis.com/auth/calendar.read
3216
+ # Corresponds to the JSON property `canonicalScopes`
3217
+ # @return [String]
3218
+ attr_accessor :canonical_scopes
3219
+
3220
+ def initialize(**args)
3221
+ update!(**args)
3222
+ end
3223
+
3224
+ # Update properties of this object
3225
+ def update!(**args)
3226
+ @canonical_scopes = args[:canonical_scopes] if args.key?(:canonical_scopes)
3227
+ end
3228
+ end
3229
+
3230
+ # This resource represents a long-running operation that is the result of a
3231
+ # network API call.
3232
+ class Operation
3233
+ include Google::Apis::Core::Hashable
3234
+
3235
+ # If the value is `false`, it means the operation is still in progress.
3236
+ # If `true`, the operation is completed, and either `error` or `response` is
3237
+ # available.
3238
+ # Corresponds to the JSON property `done`
3239
+ # @return [Boolean]
3240
+ attr_accessor :done
3241
+ alias_method :done?, :done
3242
+
3243
+ # The `Status` type defines a logical error model that is suitable for different
3244
+ # programming environments, including REST APIs and RPC APIs. It is used by
3245
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
3246
+ # - Simple to use and understand for most users
3247
+ # - Flexible enough to meet unexpected needs
3248
+ # # Overview
3249
+ # The `Status` message contains three pieces of data: error code, error message,
3250
+ # and error details. The error code should be an enum value of
3251
+ # google.rpc.Code, but it may accept additional error codes if needed. The
3252
+ # error message should be a developer-facing English message that helps
3253
+ # developers *understand* and *resolve* the error. If a localized user-facing
3254
+ # error message is needed, put the localized message in the error details or
3255
+ # localize it in the client. The optional error details may contain arbitrary
3256
+ # information about the error. There is a predefined set of error detail types
3257
+ # in the package `google.rpc` that can be used for common error conditions.
3258
+ # # Language mapping
3259
+ # The `Status` message is the logical representation of the error model, but it
3260
+ # is not necessarily the actual wire format. When the `Status` message is
3261
+ # exposed in different client libraries and different wire protocols, it can be
3262
+ # mapped differently. For example, it will likely be mapped to some exceptions
3263
+ # in Java, but more likely mapped to some error codes in C.
3264
+ # # Other uses
3265
+ # The error model and the `Status` message can be used in a variety of
3266
+ # environments, either with or without APIs, to provide a
3267
+ # consistent developer experience across different environments.
3268
+ # Example uses of this error model include:
3269
+ # - Partial errors. If a service needs to return partial errors to the client,
3270
+ # it may embed the `Status` in the normal response to indicate the partial
3271
+ # errors.
3272
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
3273
+ # have a `Status` message for error reporting.
3274
+ # - Batch operations. If a client uses batch request and batch response, the
3275
+ # `Status` message should be used directly inside batch response, one for
3276
+ # each error sub-response.
3277
+ # - Asynchronous operations. If an API call embeds asynchronous operation
3278
+ # results in its response, the status of those operations should be
3279
+ # represented directly using the `Status` message.
3280
+ # - Logging. If some API errors are stored in logs, the message `Status` could
3281
+ # be used directly after any stripping needed for security/privacy reasons.
3282
+ # Corresponds to the JSON property `error`
3283
+ # @return [Google::Apis::ServiceusageV1::Status]
3284
+ attr_accessor :error
3285
+
3286
+ # Service-specific metadata associated with the operation. It typically
3287
+ # contains progress information and common metadata such as create time.
3288
+ # Some services might not provide such metadata. Any method that returns a
3289
+ # long-running operation should document the metadata type, if any.
3290
+ # Corresponds to the JSON property `metadata`
3291
+ # @return [Hash<String,Object>]
3292
+ attr_accessor :metadata
3293
+
3294
+ # The server-assigned name, which is only unique within the same service that
3295
+ # originally returns it. If you use the default HTTP mapping, the
3296
+ # `name` should have the format of `operations/some/unique/name`.
3297
+ # Corresponds to the JSON property `name`
3298
+ # @return [String]
3299
+ attr_accessor :name
3300
+
3301
+ # The normal response of the operation in case of success. If the original
3302
+ # method returns no data on success, such as `Delete`, the response is
3303
+ # `google.protobuf.Empty`. If the original method is standard
3304
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
3305
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
3306
+ # is the original method name. For example, if the original method name
3307
+ # is `TakeSnapshot()`, the inferred response type is
3308
+ # `TakeSnapshotResponse`.
3309
+ # Corresponds to the JSON property `response`
3310
+ # @return [Hash<String,Object>]
3311
+ attr_accessor :response
3312
+
3313
+ def initialize(**args)
3314
+ update!(**args)
3315
+ end
3316
+
3317
+ # Update properties of this object
3318
+ def update!(**args)
3319
+ @done = args[:done] if args.key?(:done)
3320
+ @error = args[:error] if args.key?(:error)
3321
+ @metadata = args[:metadata] if args.key?(:metadata)
3322
+ @name = args[:name] if args.key?(:name)
3323
+ @response = args[:response] if args.key?(:response)
3324
+ end
3325
+ end
3326
+
3327
+ # The metadata associated with a long running operation resource.
3328
+ class OperationMetadata
3329
+ include Google::Apis::Core::Hashable
3330
+
3331
+ # Percentage of completion of this operation, ranging from 0 to 100.
3332
+ # Corresponds to the JSON property `progressPercentage`
3333
+ # @return [Fixnum]
3334
+ attr_accessor :progress_percentage
3335
+
3336
+ # The full name of the resources that this operation is directly
3337
+ # associated with.
3338
+ # Corresponds to the JSON property `resourceNames`
3339
+ # @return [Array<String>]
3340
+ attr_accessor :resource_names
3341
+
3342
+ # The start time of the operation.
3343
+ # Corresponds to the JSON property `startTime`
3344
+ # @return [String]
3345
+ attr_accessor :start_time
3346
+
3347
+ # Detailed status information for each step. The order is undetermined.
3348
+ # Corresponds to the JSON property `steps`
3349
+ # @return [Array<Google::Apis::ServiceusageV1::Step>]
3350
+ attr_accessor :steps
3351
+
3352
+ def initialize(**args)
3353
+ update!(**args)
3354
+ end
3355
+
3356
+ # Update properties of this object
3357
+ def update!(**args)
3358
+ @progress_percentage = args[:progress_percentage] if args.key?(:progress_percentage)
3359
+ @resource_names = args[:resource_names] if args.key?(:resource_names)
3360
+ @start_time = args[:start_time] if args.key?(:start_time)
3361
+ @steps = args[:steps] if args.key?(:steps)
3362
+ end
3363
+ end
3364
+
3365
+ # A protocol buffer option, which can be attached to a message, field,
3366
+ # enumeration, etc.
3367
+ class Option
3368
+ include Google::Apis::Core::Hashable
3369
+
3370
+ # The option's name. For protobuf built-in options (options defined in
3371
+ # descriptor.proto), this is the short name. For example, `"map_entry"`.
3372
+ # For custom options, it should be the fully-qualified name. For example,
3373
+ # `"google.api.http"`.
3374
+ # Corresponds to the JSON property `name`
3375
+ # @return [String]
3376
+ attr_accessor :name
3377
+
3378
+ # The option's value packed in an Any message. If the value is a primitive,
3379
+ # the corresponding wrapper type defined in google/protobuf/wrappers.proto
3380
+ # should be used. If the value is an enum, it should be stored as an int32
3381
+ # value using the google.protobuf.Int32Value type.
3382
+ # Corresponds to the JSON property `value`
3383
+ # @return [Hash<String,Object>]
3384
+ attr_accessor :value
3385
+
3386
+ def initialize(**args)
3387
+ update!(**args)
3388
+ end
3389
+
3390
+ # Update properties of this object
3391
+ def update!(**args)
3392
+ @name = args[:name] if args.key?(:name)
3393
+ @value = args[:value] if args.key?(:value)
3394
+ end
3395
+ end
3396
+
3397
+ # Represents a documentation page. A page can contain subpages to represent
3398
+ # nested documentation set structure.
3399
+ class Page
3400
+ include Google::Apis::Core::Hashable
3401
+
3402
+ # The Markdown content of the page. You can use <code>&#40;== include `path` ==&#
3403
+ # 41;</code>
3404
+ # to include content from a Markdown file.
3405
+ # Corresponds to the JSON property `content`
3406
+ # @return [String]
3407
+ attr_accessor :content
3408
+
3409
+ # The name of the page. It will be used as an identity of the page to
3410
+ # generate URI of the page, text of the link to this page in navigation,
3411
+ # etc. The full page name (start from the root page name to this page
3412
+ # concatenated with `.`) can be used as reference to the page in your
3413
+ # documentation. For example:
3414
+ # <pre><code>pages:
3415
+ # - name: Tutorial
3416
+ # content: &#40;== include tutorial.md ==&#41;
3417
+ # subpages:
3418
+ # - name: Java
3419
+ # content: &#40;== include tutorial_java.md ==&#41;
3420
+ # </code></pre>
3421
+ # You can reference `Java` page using Markdown reference link syntax:
3422
+ # `Java`.
3423
+ # Corresponds to the JSON property `name`
3424
+ # @return [String]
3425
+ attr_accessor :name
3426
+
3427
+ # Subpages of this page. The order of subpages specified here will be
3428
+ # honored in the generated docset.
3429
+ # Corresponds to the JSON property `subpages`
3430
+ # @return [Array<Google::Apis::ServiceusageV1::Page>]
3431
+ attr_accessor :subpages
3432
+
3433
+ def initialize(**args)
3434
+ update!(**args)
3435
+ end
3436
+
3437
+ # Update properties of this object
3438
+ def update!(**args)
3439
+ @content = args[:content] if args.key?(:content)
3440
+ @name = args[:name] if args.key?(:name)
3441
+ @subpages = args[:subpages] if args.key?(:subpages)
3442
+ end
3443
+ end
3444
+
3445
+ # Quota configuration helps to achieve fairness and budgeting in service
3446
+ # usage.
3447
+ # The quota configuration works this way:
3448
+ # - The service configuration defines a set of metrics.
3449
+ # - For API calls, the quota.metric_rules maps methods to metrics with
3450
+ # corresponding costs.
3451
+ # - The quota.limits defines limits on the metrics, which will be used for
3452
+ # quota checks at runtime.
3453
+ # An example quota configuration in yaml format:
3454
+ # quota:
3455
+ # - name: apiWriteQpsPerProject
3456
+ # metric: library.googleapis.com/write_calls
3457
+ # unit: "1/min/`project`" # rate limit for consumer projects
3458
+ # values:
3459
+ # STANDARD: 10000
3460
+ # # The metric rules bind all methods to the read_calls metric,
3461
+ # # except for the UpdateBook and DeleteBook methods. These two methods
3462
+ # # are mapped to the write_calls metric, with the UpdateBook method
3463
+ # # consuming at twice rate as the DeleteBook method.
3464
+ # metric_rules:
3465
+ # - selector: "*"
3466
+ # metric_costs:
3467
+ # library.googleapis.com/read_calls: 1
3468
+ # - selector: google.example.library.v1.LibraryService.UpdateBook
3469
+ # metric_costs:
3470
+ # library.googleapis.com/write_calls: 2
3471
+ # - selector: google.example.library.v1.LibraryService.DeleteBook
3472
+ # metric_costs:
3473
+ # library.googleapis.com/write_calls: 1
3474
+ # Corresponding Metric definition:
3475
+ # metrics:
3476
+ # - name: library.googleapis.com/read_calls
3477
+ # display_name: Read requests
3478
+ # metric_kind: DELTA
3479
+ # value_type: INT64
3480
+ # - name: library.googleapis.com/write_calls
3481
+ # display_name: Write requests
3482
+ # metric_kind: DELTA
3483
+ # value_type: INT64
3484
+ class Quota
3485
+ include Google::Apis::Core::Hashable
3486
+
3487
+ # List of `QuotaLimit` definitions for the service.
3488
+ # Corresponds to the JSON property `limits`
3489
+ # @return [Array<Google::Apis::ServiceusageV1::QuotaLimit>]
3490
+ attr_accessor :limits
3491
+
3492
+ # List of `MetricRule` definitions, each one mapping a selected method to one
3493
+ # or more metrics.
3494
+ # Corresponds to the JSON property `metricRules`
3495
+ # @return [Array<Google::Apis::ServiceusageV1::MetricRule>]
3496
+ attr_accessor :metric_rules
3497
+
3498
+ def initialize(**args)
3499
+ update!(**args)
3500
+ end
3501
+
3502
+ # Update properties of this object
3503
+ def update!(**args)
3504
+ @limits = args[:limits] if args.key?(:limits)
3505
+ @metric_rules = args[:metric_rules] if args.key?(:metric_rules)
3506
+ end
3507
+ end
3508
+
3509
+ # `QuotaLimit` defines a specific limit that applies over a specified duration
3510
+ # for a limit type. There can be at most one limit for a duration and limit
3511
+ # type combination defined within a `QuotaGroup`.
3512
+ class QuotaLimit
3513
+ include Google::Apis::Core::Hashable
3514
+
3515
+ # Default number of tokens that can be consumed during the specified
3516
+ # duration. This is the number of tokens assigned when a client
3517
+ # application developer activates the service for his/her project.
3518
+ # Specifying a value of 0 will block all requests. This can be used if you
3519
+ # are provisioning quota to selected consumers and blocking others.
3520
+ # Similarly, a value of -1 will indicate an unlimited quota. No other
3521
+ # negative values are allowed.
3522
+ # Used by group-based quotas only.
3523
+ # Corresponds to the JSON property `defaultLimit`
3524
+ # @return [Fixnum]
3525
+ attr_accessor :default_limit
3526
+
3527
+ # Optional. User-visible, extended description for this quota limit.
3528
+ # Should be used only when more context is needed to understand this limit
3529
+ # than provided by the limit's display name (see: `display_name`).
3530
+ # Corresponds to the JSON property `description`
3531
+ # @return [String]
3532
+ attr_accessor :description
3533
+
3534
+ # User-visible display name for this limit.
3535
+ # Optional. If not set, the UI will provide a default display name based on
3536
+ # the quota configuration. This field can be used to override the default
3537
+ # display name generated from the configuration.
3538
+ # Corresponds to the JSON property `displayName`
3539
+ # @return [String]
3540
+ attr_accessor :display_name
3541
+
3542
+ # Duration of this limit in textual notation. Example: "100s", "24h", "1d".
3543
+ # For duration longer than a day, only multiple of days is supported. We
3544
+ # support only "100s" and "1d" for now. Additional support will be added in
3545
+ # the future. "0" indicates indefinite duration.
3546
+ # Used by group-based quotas only.
3547
+ # Corresponds to the JSON property `duration`
3548
+ # @return [String]
3549
+ attr_accessor :duration
3550
+
3551
+ # Free tier value displayed in the Developers Console for this limit.
3552
+ # The free tier is the number of tokens that will be subtracted from the
3553
+ # billed amount when billing is enabled.
3554
+ # This field can only be set on a limit with duration "1d", in a billable
3555
+ # group; it is invalid on any other limit. If this field is not set, it
3556
+ # defaults to 0, indicating that there is no free tier for this service.
3557
+ # Used by group-based quotas only.
3558
+ # Corresponds to the JSON property `freeTier`
3559
+ # @return [Fixnum]
3560
+ attr_accessor :free_tier
3561
+
3562
+ # Maximum number of tokens that can be consumed during the specified
3563
+ # duration. Client application developers can override the default limit up
3564
+ # to this maximum. If specified, this value cannot be set to a value less
3565
+ # than the default limit. If not specified, it is set to the default limit.
3566
+ # To allow clients to apply overrides with no upper bound, set this to -1,
3567
+ # indicating unlimited maximum quota.
3568
+ # Used by group-based quotas only.
3569
+ # Corresponds to the JSON property `maxLimit`
3570
+ # @return [Fixnum]
3571
+ attr_accessor :max_limit
3572
+
3573
+ # The name of the metric this quota limit applies to. The quota limits with
3574
+ # the same metric will be checked together during runtime. The metric must be
3575
+ # defined within the service config.
3576
+ # Corresponds to the JSON property `metric`
3577
+ # @return [String]
3578
+ attr_accessor :metric
3579
+
3580
+ # Name of the quota limit.
3581
+ # The name must be provided, and it must be unique within the service. The
3582
+ # name can only include alphanumeric characters as well as '-'.
3583
+ # The maximum length of the limit name is 64 characters.
3584
+ # Corresponds to the JSON property `name`
3585
+ # @return [String]
3586
+ attr_accessor :name
3587
+
3588
+ # Specify the unit of the quota limit. It uses the same syntax as
3589
+ # Metric.unit. The supported unit kinds are determined by the quota
3590
+ # backend system.
3591
+ # Here are some examples:
3592
+ # * "1/min/`project`" for quota per minute per project.
3593
+ # Note: the order of unit components is insignificant.
3594
+ # The "1" at the beginning is required to follow the metric unit syntax.
3595
+ # Corresponds to the JSON property `unit`
3596
+ # @return [String]
3597
+ attr_accessor :unit
3598
+
3599
+ # Tiered limit values. You must specify this as a key:value pair, with an
3600
+ # integer value that is the maximum number of requests allowed for the
3601
+ # specified unit. Currently only STANDARD is supported.
3602
+ # Corresponds to the JSON property `values`
3603
+ # @return [Hash<String,Fixnum>]
3604
+ attr_accessor :values
3605
+
3606
+ def initialize(**args)
3607
+ update!(**args)
3608
+ end
3609
+
3610
+ # Update properties of this object
3611
+ def update!(**args)
3612
+ @default_limit = args[:default_limit] if args.key?(:default_limit)
3613
+ @description = args[:description] if args.key?(:description)
3614
+ @display_name = args[:display_name] if args.key?(:display_name)
3615
+ @duration = args[:duration] if args.key?(:duration)
3616
+ @free_tier = args[:free_tier] if args.key?(:free_tier)
3617
+ @max_limit = args[:max_limit] if args.key?(:max_limit)
3618
+ @metric = args[:metric] if args.key?(:metric)
3619
+ @name = args[:name] if args.key?(:name)
3620
+ @unit = args[:unit] if args.key?(:unit)
3621
+ @values = args[:values] if args.key?(:values)
3622
+ end
3623
+ end
3624
+
3625
+ # `SourceContext` represents information about the source of a
3626
+ # protobuf element, like the file in which it is defined.
3627
+ class SourceContext
3628
+ include Google::Apis::Core::Hashable
3629
+
3630
+ # The path-qualified name of the .proto file that contained the associated
3631
+ # protobuf element. For example: `"google/protobuf/source_context.proto"`.
3632
+ # Corresponds to the JSON property `fileName`
3633
+ # @return [String]
3634
+ attr_accessor :file_name
3635
+
3636
+ def initialize(**args)
3637
+ update!(**args)
3638
+ end
3639
+
3640
+ # Update properties of this object
3641
+ def update!(**args)
3642
+ @file_name = args[:file_name] if args.key?(:file_name)
3643
+ end
3644
+ end
3645
+
3646
+ # Source information used to create a Service Config
3647
+ class SourceInfo
3648
+ include Google::Apis::Core::Hashable
3649
+
3650
+ # All files used during config generation.
3651
+ # Corresponds to the JSON property `sourceFiles`
3652
+ # @return [Array<Hash<String,Object>>]
3653
+ attr_accessor :source_files
3654
+
3655
+ def initialize(**args)
3656
+ update!(**args)
3657
+ end
3658
+
3659
+ # Update properties of this object
3660
+ def update!(**args)
3661
+ @source_files = args[:source_files] if args.key?(:source_files)
3662
+ end
3663
+ end
3664
+
3665
+ # The `Status` type defines a logical error model that is suitable for different
3666
+ # programming environments, including REST APIs and RPC APIs. It is used by
3667
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
3668
+ # - Simple to use and understand for most users
3669
+ # - Flexible enough to meet unexpected needs
3670
+ # # Overview
3671
+ # The `Status` message contains three pieces of data: error code, error message,
3672
+ # and error details. The error code should be an enum value of
3673
+ # google.rpc.Code, but it may accept additional error codes if needed. The
3674
+ # error message should be a developer-facing English message that helps
3675
+ # developers *understand* and *resolve* the error. If a localized user-facing
3676
+ # error message is needed, put the localized message in the error details or
3677
+ # localize it in the client. The optional error details may contain arbitrary
3678
+ # information about the error. There is a predefined set of error detail types
3679
+ # in the package `google.rpc` that can be used for common error conditions.
3680
+ # # Language mapping
3681
+ # The `Status` message is the logical representation of the error model, but it
3682
+ # is not necessarily the actual wire format. When the `Status` message is
3683
+ # exposed in different client libraries and different wire protocols, it can be
3684
+ # mapped differently. For example, it will likely be mapped to some exceptions
3685
+ # in Java, but more likely mapped to some error codes in C.
3686
+ # # Other uses
3687
+ # The error model and the `Status` message can be used in a variety of
3688
+ # environments, either with or without APIs, to provide a
3689
+ # consistent developer experience across different environments.
3690
+ # Example uses of this error model include:
3691
+ # - Partial errors. If a service needs to return partial errors to the client,
3692
+ # it may embed the `Status` in the normal response to indicate the partial
3693
+ # errors.
3694
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
3695
+ # have a `Status` message for error reporting.
3696
+ # - Batch operations. If a client uses batch request and batch response, the
3697
+ # `Status` message should be used directly inside batch response, one for
3698
+ # each error sub-response.
3699
+ # - Asynchronous operations. If an API call embeds asynchronous operation
3700
+ # results in its response, the status of those operations should be
3701
+ # represented directly using the `Status` message.
3702
+ # - Logging. If some API errors are stored in logs, the message `Status` could
3703
+ # be used directly after any stripping needed for security/privacy reasons.
3704
+ class Status
3705
+ include Google::Apis::Core::Hashable
3706
+
3707
+ # The status code, which should be an enum value of google.rpc.Code.
3708
+ # Corresponds to the JSON property `code`
3709
+ # @return [Fixnum]
3710
+ attr_accessor :code
3711
+
3712
+ # A list of messages that carry the error details. There is a common set of
3713
+ # message types for APIs to use.
3714
+ # Corresponds to the JSON property `details`
3715
+ # @return [Array<Hash<String,Object>>]
3716
+ attr_accessor :details
3717
+
3718
+ # A developer-facing error message, which should be in English. Any
3719
+ # user-facing error message should be localized and sent in the
3720
+ # google.rpc.Status.details field, or localized by the client.
3721
+ # Corresponds to the JSON property `message`
3722
+ # @return [String]
3723
+ attr_accessor :message
3724
+
3725
+ def initialize(**args)
3726
+ update!(**args)
3727
+ end
3728
+
3729
+ # Update properties of this object
3730
+ def update!(**args)
3731
+ @code = args[:code] if args.key?(:code)
3732
+ @details = args[:details] if args.key?(:details)
3733
+ @message = args[:message] if args.key?(:message)
3734
+ end
3735
+ end
3736
+
3737
+ # Represents the status of one operation step.
3738
+ class Step
3739
+ include Google::Apis::Core::Hashable
3740
+
3741
+ # The short description of the step.
3742
+ # Corresponds to the JSON property `description`
3743
+ # @return [String]
3744
+ attr_accessor :description
3745
+
3746
+ # The status code.
3747
+ # Corresponds to the JSON property `status`
3748
+ # @return [String]
3749
+ attr_accessor :status
3750
+
3751
+ def initialize(**args)
3752
+ update!(**args)
3753
+ end
3754
+
3755
+ # Update properties of this object
3756
+ def update!(**args)
3757
+ @description = args[:description] if args.key?(:description)
3758
+ @status = args[:status] if args.key?(:status)
3759
+ end
3760
+ end
3761
+
3762
+ # Define a parameter's name and location. The parameter may be passed as either
3763
+ # an HTTP header or a URL query parameter, and if both are passed the behavior
3764
+ # is implementation-dependent.
3765
+ class SystemParameter
3766
+ include Google::Apis::Core::Hashable
3767
+
3768
+ # Define the HTTP header name to use for the parameter. It is case
3769
+ # insensitive.
3770
+ # Corresponds to the JSON property `httpHeader`
3771
+ # @return [String]
3772
+ attr_accessor :http_header
3773
+
3774
+ # Define the name of the parameter, such as "api_key" . It is case sensitive.
3775
+ # Corresponds to the JSON property `name`
3776
+ # @return [String]
3777
+ attr_accessor :name
3778
+
3779
+ # Define the URL query parameter name to use for the parameter. It is case
3780
+ # sensitive.
3781
+ # Corresponds to the JSON property `urlQueryParameter`
3782
+ # @return [String]
3783
+ attr_accessor :url_query_parameter
3784
+
3785
+ def initialize(**args)
3786
+ update!(**args)
3787
+ end
3788
+
3789
+ # Update properties of this object
3790
+ def update!(**args)
3791
+ @http_header = args[:http_header] if args.key?(:http_header)
3792
+ @name = args[:name] if args.key?(:name)
3793
+ @url_query_parameter = args[:url_query_parameter] if args.key?(:url_query_parameter)
3794
+ end
3795
+ end
3796
+
3797
+ # Define a system parameter rule mapping system parameter definitions to
3798
+ # methods.
3799
+ class SystemParameterRule
3800
+ include Google::Apis::Core::Hashable
3801
+
3802
+ # Define parameters. Multiple names may be defined for a parameter.
3803
+ # For a given method call, only one of them should be used. If multiple
3804
+ # names are used the behavior is implementation-dependent.
3805
+ # If none of the specified names are present the behavior is
3806
+ # parameter-dependent.
3807
+ # Corresponds to the JSON property `parameters`
3808
+ # @return [Array<Google::Apis::ServiceusageV1::SystemParameter>]
3809
+ attr_accessor :parameters
3810
+
3811
+ # Selects the methods to which this rule applies. Use '*' to indicate all
3812
+ # methods in all APIs.
3813
+ # Refer to selector for syntax details.
3814
+ # Corresponds to the JSON property `selector`
3815
+ # @return [String]
3816
+ attr_accessor :selector
3817
+
3818
+ def initialize(**args)
3819
+ update!(**args)
3820
+ end
3821
+
3822
+ # Update properties of this object
3823
+ def update!(**args)
3824
+ @parameters = args[:parameters] if args.key?(:parameters)
3825
+ @selector = args[:selector] if args.key?(:selector)
3826
+ end
3827
+ end
3828
+
3829
+ # ### System parameter configuration
3830
+ # A system parameter is a special kind of parameter defined by the API
3831
+ # system, not by an individual API. It is typically mapped to an HTTP header
3832
+ # and/or a URL query parameter. This configuration specifies which methods
3833
+ # change the names of the system parameters.
3834
+ class SystemParameters
3835
+ include Google::Apis::Core::Hashable
3836
+
3837
+ # Define system parameters.
3838
+ # The parameters defined here will override the default parameters
3839
+ # implemented by the system. If this field is missing from the service
3840
+ # config, default system parameters will be used. Default system parameters
3841
+ # and names is implementation-dependent.
3842
+ # Example: define api key for all methods
3843
+ # system_parameters
3844
+ # rules:
3845
+ # - selector: "*"
3846
+ # parameters:
3847
+ # - name: api_key
3848
+ # url_query_parameter: api_key
3849
+ # Example: define 2 api key names for a specific method.
3850
+ # system_parameters
3851
+ # rules:
3852
+ # - selector: "/ListShelves"
3853
+ # parameters:
3854
+ # - name: api_key
3855
+ # http_header: Api-Key1
3856
+ # - name: api_key
3857
+ # http_header: Api-Key2
3858
+ # **NOTE:** All service configuration rules follow "last one wins" order.
3859
+ # Corresponds to the JSON property `rules`
3860
+ # @return [Array<Google::Apis::ServiceusageV1::SystemParameterRule>]
3861
+ attr_accessor :rules
3862
+
3863
+ def initialize(**args)
3864
+ update!(**args)
3865
+ end
3866
+
3867
+ # Update properties of this object
3868
+ def update!(**args)
3869
+ @rules = args[:rules] if args.key?(:rules)
3870
+ end
3871
+ end
3872
+
3873
+ # A protocol buffer message type.
3874
+ class Type
3875
+ include Google::Apis::Core::Hashable
3876
+
3877
+ # The list of fields.
3878
+ # Corresponds to the JSON property `fields`
3879
+ # @return [Array<Google::Apis::ServiceusageV1::Field>]
3880
+ attr_accessor :fields
3881
+
3882
+ # The fully qualified message name.
3883
+ # Corresponds to the JSON property `name`
3884
+ # @return [String]
3885
+ attr_accessor :name
3886
+
3887
+ # The list of types appearing in `oneof` definitions in this type.
3888
+ # Corresponds to the JSON property `oneofs`
3889
+ # @return [Array<String>]
3890
+ attr_accessor :oneofs
3891
+
3892
+ # The protocol buffer options.
3893
+ # Corresponds to the JSON property `options`
3894
+ # @return [Array<Google::Apis::ServiceusageV1::Option>]
3895
+ attr_accessor :options
3896
+
3897
+ # `SourceContext` represents information about the source of a
3898
+ # protobuf element, like the file in which it is defined.
3899
+ # Corresponds to the JSON property `sourceContext`
3900
+ # @return [Google::Apis::ServiceusageV1::SourceContext]
3901
+ attr_accessor :source_context
3902
+
3903
+ # The source syntax.
3904
+ # Corresponds to the JSON property `syntax`
3905
+ # @return [String]
3906
+ attr_accessor :syntax
3907
+
3908
+ def initialize(**args)
3909
+ update!(**args)
3910
+ end
3911
+
3912
+ # Update properties of this object
3913
+ def update!(**args)
3914
+ @fields = args[:fields] if args.key?(:fields)
3915
+ @name = args[:name] if args.key?(:name)
3916
+ @oneofs = args[:oneofs] if args.key?(:oneofs)
3917
+ @options = args[:options] if args.key?(:options)
3918
+ @source_context = args[:source_context] if args.key?(:source_context)
3919
+ @syntax = args[:syntax] if args.key?(:syntax)
3920
+ end
3921
+ end
3922
+
3923
+ # Configuration controlling usage of a service.
3924
+ class Usage
3925
+ include Google::Apis::Core::Hashable
3926
+
3927
+ # The full resource name of a channel used for sending notifications to the
3928
+ # service producer.
3929
+ # Google Service Management currently only supports
3930
+ # [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
3931
+ # channel. To use Google Cloud Pub/Sub as the channel, this must be the name
3932
+ # of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
3933
+ # documented in https://cloud.google.com/pubsub/docs/overview.
3934
+ # Corresponds to the JSON property `producerNotificationChannel`
3935
+ # @return [String]
3936
+ attr_accessor :producer_notification_channel
3937
+
3938
+ # Requirements that must be satisfied before a consumer project can use the
3939
+ # service. Each requirement is of the form <service.name>/<requirement-id>;
3940
+ # for example 'serviceusage.googleapis.com/billing-enabled'.
3941
+ # Corresponds to the JSON property `requirements`
3942
+ # @return [Array<String>]
3943
+ attr_accessor :requirements
3944
+
3945
+ # A list of usage rules that apply to individual API methods.
3946
+ # **NOTE:** All service configuration rules follow "last one wins" order.
3947
+ # Corresponds to the JSON property `rules`
3948
+ # @return [Array<Google::Apis::ServiceusageV1::UsageRule>]
3949
+ attr_accessor :rules
3950
+
3951
+ def initialize(**args)
3952
+ update!(**args)
3953
+ end
3954
+
3955
+ # Update properties of this object
3956
+ def update!(**args)
3957
+ @producer_notification_channel = args[:producer_notification_channel] if args.key?(:producer_notification_channel)
3958
+ @requirements = args[:requirements] if args.key?(:requirements)
3959
+ @rules = args[:rules] if args.key?(:rules)
3960
+ end
3961
+ end
3962
+
3963
+ # Usage configuration rules for the service.
3964
+ # NOTE: Under development.
3965
+ # Use this rule to configure unregistered calls for the service. Unregistered
3966
+ # calls are calls that do not contain consumer project identity.
3967
+ # (Example: calls that do not contain an API key).
3968
+ # By default, API methods do not allow unregistered calls, and each method call
3969
+ # must be identified by a consumer project identity. Use this rule to
3970
+ # allow/disallow unregistered calls.
3971
+ # Example of an API that wants to allow unregistered calls for entire service.
3972
+ # usage:
3973
+ # rules:
3974
+ # - selector: "*"
3975
+ # allow_unregistered_calls: true
3976
+ # Example of a method that wants to allow unregistered calls.
3977
+ # usage:
3978
+ # rules:
3979
+ # - selector: "google.example.library.v1.LibraryService.CreateBook"
3980
+ # allow_unregistered_calls: true
3981
+ class UsageRule
3982
+ include Google::Apis::Core::Hashable
3983
+
3984
+ # If true, the selected method allows unregistered calls, e.g. calls
3985
+ # that don't identify any user or application.
3986
+ # Corresponds to the JSON property `allowUnregisteredCalls`
3987
+ # @return [Boolean]
3988
+ attr_accessor :allow_unregistered_calls
3989
+ alias_method :allow_unregistered_calls?, :allow_unregistered_calls
3990
+
3991
+ # Selects the methods to which this rule applies. Use '*' to indicate all
3992
+ # methods in all APIs.
3993
+ # Refer to selector for syntax details.
3994
+ # Corresponds to the JSON property `selector`
3995
+ # @return [String]
3996
+ attr_accessor :selector
3997
+
3998
+ # If true, the selected method should skip service control and the control
3999
+ # plane features, such as quota and billing, will not be available.
4000
+ # This flag is used by Google Cloud Endpoints to bypass checks for internal
4001
+ # methods, such as service health check methods.
4002
+ # Corresponds to the JSON property `skipServiceControl`
4003
+ # @return [Boolean]
4004
+ attr_accessor :skip_service_control
4005
+ alias_method :skip_service_control?, :skip_service_control
4006
+
4007
+ def initialize(**args)
4008
+ update!(**args)
4009
+ end
4010
+
4011
+ # Update properties of this object
4012
+ def update!(**args)
4013
+ @allow_unregistered_calls = args[:allow_unregistered_calls] if args.key?(:allow_unregistered_calls)
4014
+ @selector = args[:selector] if args.key?(:selector)
4015
+ @skip_service_control = args[:skip_service_control] if args.key?(:skip_service_control)
4016
+ end
4017
+ end
4018
+ end
4019
+ end
4020
+ end