google-api-client 0.24.2 → 0.24.3

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