google-api-client 0.10.2 → 0.10.3

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