google-cloud-compute-v1 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +181 -14
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +330 -20
  4. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +64 -0
  5. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  7. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  8. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  9. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +198 -23
  13. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +499 -40
  14. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +62 -0
  15. data/lib/google/cloud/compute/v1/compute_pb.rb +281 -25
  16. data/lib/google/cloud/compute/v1/cross_site_networks/credentials.rb +52 -0
  17. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +975 -0
  18. data/lib/google/cloud/compute/v1/cross_site_networks/rest/service_stub.rb +391 -0
  19. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +51 -0
  20. data/lib/google/cloud/compute/v1/cross_site_networks.rb +47 -0
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +181 -14
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +390 -42
  23. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  24. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  25. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  26. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  27. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  28. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  29. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  31. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  32. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  33. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +217 -10
  34. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +63 -0
  35. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +151 -15
  36. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +246 -21
  37. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +203 -18
  38. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +91 -9
  39. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +128 -10
  40. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +333 -21
  41. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +63 -0
  42. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -1
  43. data/lib/google/cloud/compute/v1/images/rest/client.rb +161 -18
  44. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +159 -24
  45. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +920 -95
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +473 -40
  47. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +64 -0
  48. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  49. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  50. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1144 -99
  51. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +127 -0
  52. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  53. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  54. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  55. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  56. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  57. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  58. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  59. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  60. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  61. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  62. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  63. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  64. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  65. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  66. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  67. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  68. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  69. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  70. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  71. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  72. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  73. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  74. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  75. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  76. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  77. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  78. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  79. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  80. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  81. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  82. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  83. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  84. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  85. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  86. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  87. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  88. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  89. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  90. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  91. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1268 -0
  92. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +521 -0
  93. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  94. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  95. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  96. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +269 -29
  97. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  98. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  99. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  100. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  101. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  102. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  103. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  104. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  105. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  106. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  107. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1268 -0
  108. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +521 -0
  109. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  110. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  111. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  112. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +280 -14
  113. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +64 -0
  114. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  115. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  116. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  117. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  118. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  119. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  120. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  121. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  122. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  123. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  124. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  125. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  126. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  127. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  128. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  129. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  130. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  131. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  132. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  133. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  134. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  135. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  136. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  137. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  138. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  139. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  140. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  141. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  142. data/lib/google/cloud/compute/v1/rest.rb +10 -0
  143. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  144. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  145. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  146. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  147. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +234 -22
  148. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  149. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +130 -13
  150. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  151. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  152. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  153. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  154. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  155. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  156. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  157. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  158. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +320 -20
  159. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +64 -0
  160. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +387 -26
  161. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +64 -0
  162. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  163. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  164. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  165. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  166. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  167. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  168. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  169. data/lib/google/cloud/compute/v1/version.rb +1 -1
  170. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  171. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  172. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  173. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  174. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  175. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  176. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  177. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  178. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  179. data/lib/google/cloud/compute/v1.rb +10 -0
  180. data/proto_docs/google/api/client.rb +149 -29
  181. data/proto_docs/google/cloud/compute/v1/compute.rb +44226 -5514
  182. metadata +52 -2
@@ -0,0 +1,739 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/preview_features/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Compute
27
+ module V1
28
+ module PreviewFeatures
29
+ module Rest
30
+ ##
31
+ # REST client for the PreviewFeatures service.
32
+ #
33
+ # The PreviewFeatures API.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
41
+
42
+ # @private
43
+ attr_reader :preview_features_stub
44
+
45
+ ##
46
+ # Configure the PreviewFeatures Client class.
47
+ #
48
+ # See {::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all PreviewFeatures clients
54
+ # ::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "Compute", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.get.timeout = 600.0
75
+ default_config.rpcs.get.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
+ }
78
+
79
+ default_config.rpcs.list.timeout = 600.0
80
+ default_config.rpcs.list.retry_policy = {
81
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
82
+ }
83
+
84
+ default_config.rpcs.update.timeout = 600.0
85
+
86
+ default_config
87
+ end
88
+ yield @configure if block_given?
89
+ @configure
90
+ end
91
+
92
+ ##
93
+ # Configure the PreviewFeatures Client instance.
94
+ #
95
+ # The configuration is set to the derived mode, meaning that values can be changed,
96
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
97
+ # should be made on {Client.configure}.
98
+ #
99
+ # See {::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client::Configuration}
100
+ # for a description of the configuration fields.
101
+ #
102
+ # @yield [config] Configure the Client client.
103
+ # @yieldparam config [Client::Configuration]
104
+ #
105
+ # @return [Client::Configuration]
106
+ #
107
+ def configure
108
+ yield @config if block_given?
109
+ @config
110
+ end
111
+
112
+ ##
113
+ # The effective universe domain
114
+ #
115
+ # @return [String]
116
+ #
117
+ def universe_domain
118
+ @preview_features_stub.universe_domain
119
+ end
120
+
121
+ ##
122
+ # Create a new PreviewFeatures REST client object.
123
+ #
124
+ # @example
125
+ #
126
+ # # Create a client using the default configuration
127
+ # client = ::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.new
128
+ #
129
+ # # Create a client using a custom configuration
130
+ # client = ::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.new do |config|
131
+ # config.timeout = 10.0
132
+ # end
133
+ #
134
+ # @yield [config] Configure the PreviewFeatures client.
135
+ # @yieldparam config [Client::Configuration]
136
+ #
137
+ def initialize
138
+ # Create the configuration object
139
+ @config = Configuration.new Client.configure
140
+
141
+ # Yield the configuration if needed
142
+ yield @config if block_given?
143
+
144
+ # Create credentials
145
+ credentials = @config.credentials
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
147
+ # but only if the default endpoint does not have a region prefix.
148
+ enable_self_signed_jwt = @config.endpoint.nil? ||
149
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
+ !@config.endpoint.split(".").first.include?("-"))
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+
157
+ @quota_project_id = @config.quota_project
158
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
159
+
160
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
161
+ config.credentials = credentials
162
+ config.quota_project = @quota_project_id
163
+ config.endpoint = @config.endpoint
164
+ config.universe_domain = @config.universe_domain
165
+ end
166
+
167
+ @preview_features_stub = ::Google::Cloud::Compute::V1::PreviewFeatures::Rest::ServiceStub.new(
168
+ endpoint: @config.endpoint,
169
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
170
+ universe_domain: @config.universe_domain,
171
+ credentials: credentials,
172
+ logger: @config.logger
173
+ )
174
+
175
+ @preview_features_stub.logger(stub: true)&.info do |entry|
176
+ entry.set_system_name
177
+ entry.set_service
178
+ entry.message = "Created client for #{entry.service}"
179
+ entry.set_credentials_fields credentials
180
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
181
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
182
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
183
+ end
184
+ end
185
+
186
+ ##
187
+ # Get the associated client for long-running operations via GlobalOperations.
188
+ #
189
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
190
+ #
191
+ attr_reader :global_operations
192
+
193
+ ##
194
+ # The logger used for request/response debug logging.
195
+ #
196
+ # @return [Logger]
197
+ #
198
+ def logger
199
+ @preview_features_stub.logger
200
+ end
201
+
202
+ # Service calls
203
+
204
+ ##
205
+ # Returns the details of the given PreviewFeature.
206
+ #
207
+ # @overload get(request, options = nil)
208
+ # Pass arguments to `get` via a request object, either of type
209
+ # {::Google::Cloud::Compute::V1::GetPreviewFeatureRequest} or an equivalent Hash.
210
+ #
211
+ # @param request [::Google::Cloud::Compute::V1::GetPreviewFeatureRequest, ::Hash]
212
+ # A request object representing the call parameters. Required. To specify no
213
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
214
+ # @param options [::Gapic::CallOptions, ::Hash]
215
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
216
+ #
217
+ # @overload get(preview_feature: nil, project: nil)
218
+ # Pass arguments to `get` via keyword arguments. Note that at
219
+ # least one keyword argument is required. To specify no parameters, or to keep all
220
+ # the default parameter values, pass an empty Hash as a request object (see above).
221
+ #
222
+ # @param preview_feature [::String]
223
+ # Name of the PreviewFeature for this request.
224
+ # @param project [::String]
225
+ # Project ID for this request.
226
+ # @yield [result, operation] Access the result along with the TransportOperation object
227
+ # @yieldparam result [::Google::Cloud::Compute::V1::PreviewFeature]
228
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
229
+ #
230
+ # @return [::Google::Cloud::Compute::V1::PreviewFeature]
231
+ #
232
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
233
+ #
234
+ # @example Basic example
235
+ # require "google/cloud/compute/v1"
236
+ #
237
+ # # Create a client object. The client can be reused for multiple calls.
238
+ # client = Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.new
239
+ #
240
+ # # Create a request. To set request fields, pass in keyword arguments.
241
+ # request = Google::Cloud::Compute::V1::GetPreviewFeatureRequest.new
242
+ #
243
+ # # Call the get method.
244
+ # result = client.get request
245
+ #
246
+ # # The returned object is of type Google::Cloud::Compute::V1::PreviewFeature.
247
+ # p result
248
+ #
249
+ def get request, options = nil
250
+ raise ::ArgumentError, "request must be provided" if request.nil?
251
+
252
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetPreviewFeatureRequest
253
+
254
+ # Converts hash and nil to an options object
255
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
256
+
257
+ # Customize the options with defaults
258
+ call_metadata = @config.rpcs.get.metadata.to_h
259
+
260
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
261
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
262
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
263
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
264
+ transports_version_send: [:rest]
265
+
266
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
267
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
268
+
269
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
270
+ metadata: call_metadata,
271
+ retry_policy: @config.rpcs.get.retry_policy
272
+
273
+ options.apply_defaults timeout: @config.timeout,
274
+ metadata: @config.metadata,
275
+ retry_policy: @config.retry_policy
276
+
277
+ @preview_features_stub.get request, options do |result, operation|
278
+ yield result, operation if block_given?
279
+ end
280
+ rescue ::Gapic::Rest::Error => e
281
+ raise ::Google::Cloud::Error.from_error(e)
282
+ end
283
+
284
+ ##
285
+ # Returns the details of the given PreviewFeature.
286
+ #
287
+ # @overload list(request, options = nil)
288
+ # Pass arguments to `list` via a request object, either of type
289
+ # {::Google::Cloud::Compute::V1::ListPreviewFeaturesRequest} or an equivalent Hash.
290
+ #
291
+ # @param request [::Google::Cloud::Compute::V1::ListPreviewFeaturesRequest, ::Hash]
292
+ # A request object representing the call parameters. Required. To specify no
293
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
294
+ # @param options [::Gapic::CallOptions, ::Hash]
295
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
296
+ #
297
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
298
+ # Pass arguments to `list` via keyword arguments. Note that at
299
+ # least one keyword argument is required. To specify no parameters, or to keep all
300
+ # the default parameter values, pass an empty Hash as a request object (see above).
301
+ #
302
+ # @param filter [::String]
303
+ # A filter expression that filters resources listed in the response. Most
304
+ # Compute resources support two types of filter expressions:
305
+ # expressions that support regular expressions and expressions that follow
306
+ # API improvement proposal AIP-160.
307
+ # These two types of filter expressions cannot be mixed in one request.
308
+ #
309
+ # If you want to use AIP-160, your expression must specify the field name, an
310
+ # operator, and the value that you want to use for filtering. The value
311
+ # must be a string, a number, or a boolean. The operator
312
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
313
+ #
314
+ # For example, if you are filtering Compute Engine instances, you can
315
+ # exclude instances named `example-instance` by specifying
316
+ # `name != example-instance`.
317
+ #
318
+ # The `:*` comparison can be used to test whether a key has been defined.
319
+ # For example, to find all objects with `owner` label use:
320
+ # ```
321
+ # labels.owner:*
322
+ # ```
323
+ #
324
+ # You can also filter nested fields. For example, you could specify
325
+ # `scheduling.automaticRestart = false` to include instances only
326
+ # if they are not scheduled for automatic restarts. You can use filtering
327
+ # on nested fields to filter based onresource labels.
328
+ #
329
+ # To filter on multiple expressions, provide each separate expression within
330
+ # parentheses. For example:
331
+ # ```
332
+ # (scheduling.automaticRestart = true)
333
+ # (cpuPlatform = "Intel Skylake")
334
+ # ```
335
+ # By default, each expression is an `AND` expression. However, you
336
+ # can include `AND` and `OR` expressions explicitly.
337
+ # For example:
338
+ # ```
339
+ # (cpuPlatform = "Intel Skylake") OR
340
+ # (cpuPlatform = "Intel Broadwell") AND
341
+ # (scheduling.automaticRestart = true)
342
+ # ```
343
+ #
344
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
345
+ # (not equal) operator against a single un-parenthesized expression with or
346
+ # without quotes or against multiple parenthesized expressions. Examples:
347
+ #
348
+ # `fieldname eq unquoted literal`
349
+ # `fieldname eq 'single quoted literal'`
350
+ # `fieldname eq "double quoted literal"`
351
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
352
+ #
353
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
354
+ # The literal value must match the entire field.
355
+ #
356
+ # For example, to filter for instances that do not end with name "instance",
357
+ # you would use `name ne .*instance`.
358
+ #
359
+ # You cannot combine constraints on multiple fields using regular
360
+ # expressions.
361
+ # @param max_results [::Integer]
362
+ # The maximum number of results per page that should be returned.
363
+ # If the number of available results is larger than `maxResults`,
364
+ # Compute Engine returns a `nextPageToken` that can be used to get
365
+ # the next page of results in subsequent list requests. Acceptable values are
366
+ # `0` to `500`, inclusive. (Default: `500`)
367
+ # @param order_by [::String]
368
+ # Sorts list results by a certain order. By default, results
369
+ # are returned in alphanumerical order based on the resource name.
370
+ #
371
+ # You can also sort results in descending order based on the creation
372
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
373
+ # results based on the `creationTimestamp` field in
374
+ # reverse chronological order (newest result first). Use this to sort
375
+ # resources like operations so that the newest operation is returned first.
376
+ #
377
+ # Currently, only sorting by `name` or
378
+ # `creationTimestamp desc` is supported.
379
+ # @param page_token [::String]
380
+ # Specifies a page token to use. Set `pageToken` to the
381
+ # `nextPageToken` returned by a previous list request to get
382
+ # the next page of results.
383
+ # @param project [::String]
384
+ # Project ID for this request.
385
+ # @param return_partial_success [::Boolean]
386
+ # Opt-in for partial success behavior which provides partial results in case
387
+ # of failure. The default value is false.
388
+ #
389
+ # For example, when partial success behavior is enabled, aggregatedList for a
390
+ # single zone scope either returns all resources in the zone or no resources,
391
+ # with an error code.
392
+ # @yield [result, operation] Access the result along with the TransportOperation object
393
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PreviewFeature>]
394
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
395
+ #
396
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::PreviewFeature>]
397
+ #
398
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
399
+ #
400
+ # @example Basic example
401
+ # require "google/cloud/compute/v1"
402
+ #
403
+ # # Create a client object. The client can be reused for multiple calls.
404
+ # client = Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.new
405
+ #
406
+ # # Create a request. To set request fields, pass in keyword arguments.
407
+ # request = Google::Cloud::Compute::V1::ListPreviewFeaturesRequest.new
408
+ #
409
+ # # Call the list method.
410
+ # result = client.list request
411
+ #
412
+ # # The returned object is of type Google::Cloud::Compute::V1::PreviewFeatureList.
413
+ # p result
414
+ #
415
+ def list request, options = nil
416
+ raise ::ArgumentError, "request must be provided" if request.nil?
417
+
418
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListPreviewFeaturesRequest
419
+
420
+ # Converts hash and nil to an options object
421
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
422
+
423
+ # Customize the options with defaults
424
+ call_metadata = @config.rpcs.list.metadata.to_h
425
+
426
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
427
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
428
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
429
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
430
+ transports_version_send: [:rest]
431
+
432
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
433
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
+
435
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
436
+ metadata: call_metadata,
437
+ retry_policy: @config.rpcs.list.retry_policy
438
+
439
+ options.apply_defaults timeout: @config.timeout,
440
+ metadata: @config.metadata,
441
+ retry_policy: @config.retry_policy
442
+
443
+ @preview_features_stub.list request, options do |result, operation|
444
+ result = ::Gapic::Rest::PagedEnumerable.new @preview_features_stub, :list, "items", request, result, options
445
+ yield result, operation if block_given?
446
+ throw :response, result
447
+ end
448
+ rescue ::Gapic::Rest::Error => e
449
+ raise ::Google::Cloud::Error.from_error(e)
450
+ end
451
+
452
+ ##
453
+ # Patches the given PreviewFeature. This method is used to enable or disable
454
+ # a PreviewFeature.
455
+ #
456
+ # @overload update(request, options = nil)
457
+ # Pass arguments to `update` via a request object, either of type
458
+ # {::Google::Cloud::Compute::V1::UpdatePreviewFeatureRequest} or an equivalent Hash.
459
+ #
460
+ # @param request [::Google::Cloud::Compute::V1::UpdatePreviewFeatureRequest, ::Hash]
461
+ # A request object representing the call parameters. Required. To specify no
462
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
463
+ # @param options [::Gapic::CallOptions, ::Hash]
464
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
465
+ #
466
+ # @overload update(preview_feature: nil, preview_feature_resource: nil, project: nil, request_id: nil)
467
+ # Pass arguments to `update` via keyword arguments. Note that at
468
+ # least one keyword argument is required. To specify no parameters, or to keep all
469
+ # the default parameter values, pass an empty Hash as a request object (see above).
470
+ #
471
+ # @param preview_feature [::String]
472
+ # Name of the PreviewFeature for this request.
473
+ # @param preview_feature_resource [::Google::Cloud::Compute::V1::PreviewFeature, ::Hash]
474
+ # The body resource for this request
475
+ # @param project [::String]
476
+ # Project ID for this request.
477
+ # @param request_id [::String]
478
+ # An optional request ID to identify requests. Specify a unique request ID so
479
+ # that if you must retry your request, the server will know to ignore the
480
+ # request if it has already been completed.
481
+ #
482
+ # For example, consider a situation where you make an initial request and
483
+ # the request times out. If you make the request again with the same
484
+ # request ID, the server can check if original operation with the same
485
+ # request ID was received, and if so, will ignore the second request. This
486
+ # prevents clients from accidentally creating duplicate commitments.
487
+ #
488
+ # The request ID must be
489
+ # a valid UUID with the exception that zero UUID is not supported
490
+ # (00000000-0000-0000-0000-000000000000).
491
+ # @yield [result, operation] Access the result along with the TransportOperation object
492
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
493
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
494
+ #
495
+ # @return [::Gapic::GenericLRO::Operation]
496
+ #
497
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
498
+ #
499
+ # @example Basic example
500
+ # require "google/cloud/compute/v1"
501
+ #
502
+ # # Create a client object. The client can be reused for multiple calls.
503
+ # client = Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.new
504
+ #
505
+ # # Create a request. To set request fields, pass in keyword arguments.
506
+ # request = Google::Cloud::Compute::V1::UpdatePreviewFeatureRequest.new
507
+ #
508
+ # # Call the update method.
509
+ # result = client.update request
510
+ #
511
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
512
+ # p result
513
+ #
514
+ def update request, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request.nil?
516
+
517
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdatePreviewFeatureRequest
518
+
519
+ # Converts hash and nil to an options object
520
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
521
+
522
+ # Customize the options with defaults
523
+ call_metadata = @config.rpcs.update.metadata.to_h
524
+
525
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
526
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
527
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
528
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
529
+ transports_version_send: [:rest]
530
+
531
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
532
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
533
+
534
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
535
+ metadata: call_metadata,
536
+ retry_policy: @config.rpcs.update.retry_policy
537
+
538
+ options.apply_defaults timeout: @config.timeout,
539
+ metadata: @config.metadata,
540
+ retry_policy: @config.retry_policy
541
+
542
+ @preview_features_stub.update request, options do |result, response|
543
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
544
+ operation: result,
545
+ client: global_operations,
546
+ request_values: {
547
+ "project" => request.project
548
+ },
549
+ options: options
550
+ )
551
+ yield result, response if block_given?
552
+ throw :response, result
553
+ end
554
+ rescue ::Gapic::Rest::Error => e
555
+ raise ::Google::Cloud::Error.from_error(e)
556
+ end
557
+
558
+ ##
559
+ # Configuration class for the PreviewFeatures REST API.
560
+ #
561
+ # This class represents the configuration for PreviewFeatures REST,
562
+ # providing control over timeouts, retry behavior, logging, transport
563
+ # parameters, and other low-level controls. Certain parameters can also be
564
+ # applied individually to specific RPCs. See
565
+ # {::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client::Configuration::Rpcs}
566
+ # for a list of RPCs that can be configured independently.
567
+ #
568
+ # Configuration can be applied globally to all clients, or to a single client
569
+ # on construction.
570
+ #
571
+ # @example
572
+ #
573
+ # # Modify the global config, setting the timeout for
574
+ # # get to 20 seconds,
575
+ # # and all remaining timeouts to 10 seconds.
576
+ # ::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.configure do |config|
577
+ # config.timeout = 10.0
578
+ # config.rpcs.get.timeout = 20.0
579
+ # end
580
+ #
581
+ # # Apply the above configuration only to a new client.
582
+ # client = ::Google::Cloud::Compute::V1::PreviewFeatures::Rest::Client.new do |config|
583
+ # config.timeout = 10.0
584
+ # config.rpcs.get.timeout = 20.0
585
+ # end
586
+ #
587
+ # @!attribute [rw] endpoint
588
+ # A custom service endpoint, as a hostname or hostname:port. The default is
589
+ # nil, indicating to use the default endpoint in the current universe domain.
590
+ # @return [::String,nil]
591
+ # @!attribute [rw] credentials
592
+ # Credentials to send with calls. You may provide any of the following types:
593
+ # * (`String`) The path to a service account key file in JSON format
594
+ # * (`Hash`) A service account key as a Hash
595
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
596
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
597
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
598
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
599
+ # * (`nil`) indicating no credentials
600
+ #
601
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
602
+ # external source for authentication to Google Cloud, you must validate it before
603
+ # providing it to a Google API client library. Providing an unvalidated credential
604
+ # configuration to Google APIs can compromise the security of your systems and data.
605
+ # For more information, refer to [Validate credential configurations from external
606
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
607
+ # @return [::Object]
608
+ # @!attribute [rw] scope
609
+ # The OAuth scopes
610
+ # @return [::Array<::String>]
611
+ # @!attribute [rw] lib_name
612
+ # The library name as recorded in instrumentation and logging
613
+ # @return [::String]
614
+ # @!attribute [rw] lib_version
615
+ # The library version as recorded in instrumentation and logging
616
+ # @return [::String]
617
+ # @!attribute [rw] timeout
618
+ # The call timeout in seconds.
619
+ # @return [::Numeric]
620
+ # @!attribute [rw] metadata
621
+ # Additional headers to be sent with the call.
622
+ # @return [::Hash{::Symbol=>::String}]
623
+ # @!attribute [rw] retry_policy
624
+ # The retry policy. The value is a hash with the following keys:
625
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
626
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
627
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
628
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
629
+ # trigger a retry.
630
+ # @return [::Hash]
631
+ # @!attribute [rw] quota_project
632
+ # A separate project against which to charge quota.
633
+ # @return [::String]
634
+ # @!attribute [rw] universe_domain
635
+ # The universe domain within which to make requests. This determines the
636
+ # default endpoint URL. The default value of nil uses the environment
637
+ # universe (usually the default "googleapis.com" universe).
638
+ # @return [::String,nil]
639
+ # @!attribute [rw] logger
640
+ # A custom logger to use for request/response debug logging, or the value
641
+ # `:default` (the default) to construct a default logger, or `nil` to
642
+ # explicitly disable logging.
643
+ # @return [::Logger,:default,nil]
644
+ #
645
+ class Configuration
646
+ extend ::Gapic::Config
647
+
648
+ # @private
649
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
650
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
651
+
652
+ config_attr :endpoint, nil, ::String, nil
653
+ config_attr :credentials, nil do |value|
654
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
655
+ allowed.any? { |klass| klass === value }
656
+ end
657
+ config_attr :scope, nil, ::String, ::Array, nil
658
+ config_attr :lib_name, nil, ::String, nil
659
+ config_attr :lib_version, nil, ::String, nil
660
+ config_attr :timeout, nil, ::Numeric, nil
661
+ config_attr :metadata, nil, ::Hash, nil
662
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
663
+ config_attr :quota_project, nil, ::String, nil
664
+ config_attr :universe_domain, nil, ::String, nil
665
+ config_attr :logger, :default, ::Logger, nil, :default
666
+
667
+ # @private
668
+ def initialize parent_config = nil
669
+ @parent_config = parent_config unless parent_config.nil?
670
+
671
+ yield self if block_given?
672
+ end
673
+
674
+ ##
675
+ # Configurations for individual RPCs
676
+ # @return [Rpcs]
677
+ #
678
+ def rpcs
679
+ @rpcs ||= begin
680
+ parent_rpcs = nil
681
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
682
+ Rpcs.new parent_rpcs
683
+ end
684
+ end
685
+
686
+ ##
687
+ # Configuration RPC class for the PreviewFeatures API.
688
+ #
689
+ # Includes fields providing the configuration for each RPC in this service.
690
+ # Each configuration object is of type `Gapic::Config::Method` and includes
691
+ # the following configuration fields:
692
+ #
693
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
694
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
695
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
696
+ # include the following keys:
697
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
698
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
699
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
700
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
701
+ # trigger a retry.
702
+ #
703
+ class Rpcs
704
+ ##
705
+ # RPC-specific configuration for `get`
706
+ # @return [::Gapic::Config::Method]
707
+ #
708
+ attr_reader :get
709
+ ##
710
+ # RPC-specific configuration for `list`
711
+ # @return [::Gapic::Config::Method]
712
+ #
713
+ attr_reader :list
714
+ ##
715
+ # RPC-specific configuration for `update`
716
+ # @return [::Gapic::Config::Method]
717
+ #
718
+ attr_reader :update
719
+
720
+ # @private
721
+ def initialize parent_rpcs = nil
722
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
723
+ @get = ::Gapic::Config::Method.new get_config
724
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
725
+ @list = ::Gapic::Config::Method.new list_config
726
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
727
+ @update = ::Gapic::Config::Method.new update_config
728
+
729
+ yield self if block_given?
730
+ end
731
+ end
732
+ end
733
+ end
734
+ end
735
+ end
736
+ end
737
+ end
738
+ end
739
+ end