google-cloud-compute-v1 3.4.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 (175) 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 +237 -20
  4. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  5. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  7. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  8. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  9. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  11. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +198 -23
  12. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +499 -40
  13. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +62 -0
  14. data/lib/google/cloud/compute/v1/compute_pb.rb +264 -25
  15. data/lib/google/cloud/compute/v1/cross_site_networks/credentials.rb +52 -0
  16. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +975 -0
  17. data/lib/google/cloud/compute/v1/cross_site_networks/rest/service_stub.rb +391 -0
  18. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +51 -0
  19. data/lib/google/cloud/compute/v1/cross_site_networks.rb +47 -0
  20. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +181 -14
  21. data/lib/google/cloud/compute/v1/disks/rest/client.rb +390 -42
  22. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  23. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  24. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  25. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  26. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  27. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  28. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  29. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  31. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  32. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +126 -10
  33. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +151 -15
  34. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +246 -21
  35. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +203 -18
  36. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +91 -9
  37. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +128 -10
  38. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +333 -21
  39. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +63 -0
  40. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -1
  41. data/lib/google/cloud/compute/v1/images/rest/client.rb +161 -18
  42. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +159 -24
  43. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +920 -95
  44. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +380 -40
  45. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  46. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  47. data/lib/google/cloud/compute/v1/instances/rest/client.rb +939 -104
  48. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  49. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  50. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  51. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  52. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  53. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  54. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  55. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  56. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  57. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  58. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  59. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  60. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  61. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  62. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  63. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  64. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  65. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  66. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  67. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  68. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  69. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  70. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  71. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  72. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  73. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  74. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  75. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  76. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  77. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  78. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  79. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  80. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  81. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  82. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  83. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  84. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  85. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  86. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  87. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1268 -0
  88. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +521 -0
  89. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  90. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  91. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  92. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +269 -29
  93. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  94. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  95. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  96. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  97. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  98. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  99. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  100. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  101. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  102. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  103. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1268 -0
  104. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +521 -0
  105. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  106. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  107. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  108. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +187 -14
  109. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  110. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  111. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  112. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  113. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  114. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  115. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  116. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  117. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  118. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  119. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  120. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  121. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  122. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  123. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  124. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  125. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  126. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  127. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  128. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  129. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  130. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  131. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  132. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  133. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  134. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  135. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  136. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  137. data/lib/google/cloud/compute/v1/rest.rb +10 -0
  138. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  139. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  140. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  141. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  142. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +231 -21
  143. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  144. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +130 -13
  145. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  146. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  147. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  148. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  149. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  150. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  151. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  152. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  153. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +227 -20
  154. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -26
  155. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  156. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  157. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  158. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  159. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  160. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  161. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  162. data/lib/google/cloud/compute/v1/version.rb +1 -1
  163. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  164. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  165. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  166. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  167. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  168. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  169. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  170. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  171. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  172. data/lib/google/cloud/compute/v1.rb +10 -0
  173. data/proto_docs/google/api/client.rb +149 -29
  174. data/proto_docs/google/cloud/compute/v1/compute.rb +43929 -5522
  175. metadata +52 -2
@@ -0,0 +1,980 @@
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/wire_groups/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 WireGroups
29
+ module Rest
30
+ ##
31
+ # REST client for the WireGroups service.
32
+ #
33
+ # The WireGroups 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 :wire_groups_stub
44
+
45
+ ##
46
+ # Configure the WireGroups Client class.
47
+ #
48
+ # See {::Google::Cloud::Compute::V1::WireGroups::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all WireGroups clients
54
+ # ::Google::Cloud::Compute::V1::WireGroups::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.delete.timeout = 600.0
75
+
76
+ default_config.rpcs.get.timeout = 600.0
77
+ default_config.rpcs.get.retry_policy = {
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
79
+ }
80
+
81
+ default_config.rpcs.insert.timeout = 600.0
82
+
83
+ default_config.rpcs.list.timeout = 600.0
84
+ default_config.rpcs.list.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
+ }
87
+
88
+ default_config.rpcs.patch.timeout = 600.0
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the WireGroups Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::Compute::V1::WireGroups::Rest::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # The effective universe domain
118
+ #
119
+ # @return [String]
120
+ #
121
+ def universe_domain
122
+ @wire_groups_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new WireGroups REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::Compute::V1::WireGroups::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::Compute::V1::WireGroups::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the WireGroups client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ def initialize
142
+ # Create the configuration object
143
+ @config = Configuration.new Client.configure
144
+
145
+ # Yield the configuration if needed
146
+ yield @config if block_given?
147
+
148
+ # Create credentials
149
+ credentials = @config.credentials
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
151
+ # but only if the default endpoint does not have a region prefix.
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+
161
+ @quota_project_id = @config.quota_project
162
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
163
+
164
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
165
+ config.credentials = credentials
166
+ config.quota_project = @quota_project_id
167
+ config.endpoint = @config.endpoint
168
+ config.universe_domain = @config.universe_domain
169
+ end
170
+
171
+ @wire_groups_stub = ::Google::Cloud::Compute::V1::WireGroups::Rest::ServiceStub.new(
172
+ endpoint: @config.endpoint,
173
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
174
+ universe_domain: @config.universe_domain,
175
+ credentials: credentials,
176
+ logger: @config.logger
177
+ )
178
+
179
+ @wire_groups_stub.logger(stub: true)&.info do |entry|
180
+ entry.set_system_name
181
+ entry.set_service
182
+ entry.message = "Created client for #{entry.service}"
183
+ entry.set_credentials_fields credentials
184
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
185
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
186
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
187
+ end
188
+ end
189
+
190
+ ##
191
+ # Get the associated client for long-running operations via GlobalOperations.
192
+ #
193
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
194
+ #
195
+ attr_reader :global_operations
196
+
197
+ ##
198
+ # The logger used for request/response debug logging.
199
+ #
200
+ # @return [Logger]
201
+ #
202
+ def logger
203
+ @wire_groups_stub.logger
204
+ end
205
+
206
+ # Service calls
207
+
208
+ ##
209
+ # Deletes the specified wire group in the given scope.
210
+ #
211
+ # @overload delete(request, options = nil)
212
+ # Pass arguments to `delete` via a request object, either of type
213
+ # {::Google::Cloud::Compute::V1::DeleteWireGroupRequest} or an equivalent Hash.
214
+ #
215
+ # @param request [::Google::Cloud::Compute::V1::DeleteWireGroupRequest, ::Hash]
216
+ # A request object representing the call parameters. Required. To specify no
217
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
218
+ # @param options [::Gapic::CallOptions, ::Hash]
219
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
220
+ #
221
+ # @overload delete(cross_site_network: nil, project: nil, request_id: nil, wire_group: nil)
222
+ # Pass arguments to `delete` via keyword arguments. Note that at
223
+ # least one keyword argument is required. To specify no parameters, or to keep all
224
+ # the default parameter values, pass an empty Hash as a request object (see above).
225
+ #
226
+ # @param cross_site_network [::String]
227
+ # @param project [::String]
228
+ # Project ID for this request.
229
+ # @param request_id [::String]
230
+ # An optional request ID to identify requests. Specify a unique request ID so
231
+ # that if you must retry your request, the server will know to ignore the
232
+ # request if it has already been completed.
233
+ #
234
+ # For example, consider a situation where you make an initial request and
235
+ # the request times out. If you make the request again with the same
236
+ # request ID, the server can check if original operation with the same
237
+ # request ID was received, and if so, will ignore the second request. This
238
+ # prevents clients from accidentally creating duplicate commitments.
239
+ #
240
+ # The request ID must be
241
+ # a valid UUID with the exception that zero UUID is not supported
242
+ # (00000000-0000-0000-0000-000000000000).
243
+ # end_interface: MixerMutationRequestBuilder
244
+ # @param wire_group [::String]
245
+ # Name of the wire group resource to delete.
246
+ # @yield [result, operation] Access the result along with the TransportOperation object
247
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
248
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
249
+ #
250
+ # @return [::Gapic::GenericLRO::Operation]
251
+ #
252
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
253
+ #
254
+ # @example Basic example
255
+ # require "google/cloud/compute/v1"
256
+ #
257
+ # # Create a client object. The client can be reused for multiple calls.
258
+ # client = Google::Cloud::Compute::V1::WireGroups::Rest::Client.new
259
+ #
260
+ # # Create a request. To set request fields, pass in keyword arguments.
261
+ # request = Google::Cloud::Compute::V1::DeleteWireGroupRequest.new
262
+ #
263
+ # # Call the delete method.
264
+ # result = client.delete request
265
+ #
266
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
267
+ # p result
268
+ #
269
+ def delete request, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request.nil?
271
+
272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteWireGroupRequest
273
+
274
+ # Converts hash and nil to an options object
275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
276
+
277
+ # Customize the options with defaults
278
+ call_metadata = @config.rpcs.delete.metadata.to_h
279
+
280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
281
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
283
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
284
+ transports_version_send: [:rest]
285
+
286
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
287
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
+
289
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
290
+ metadata: call_metadata,
291
+ retry_policy: @config.rpcs.delete.retry_policy
292
+
293
+ options.apply_defaults timeout: @config.timeout,
294
+ metadata: @config.metadata,
295
+ retry_policy: @config.retry_policy
296
+
297
+ @wire_groups_stub.delete request, options do |result, response|
298
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
299
+ operation: result,
300
+ client: global_operations,
301
+ request_values: {
302
+ "project" => request.project
303
+ },
304
+ options: options
305
+ )
306
+ yield result, response if block_given?
307
+ throw :response, result
308
+ end
309
+ rescue ::Gapic::Rest::Error => e
310
+ raise ::Google::Cloud::Error.from_error(e)
311
+ end
312
+
313
+ ##
314
+ # Gets the specified wire group resource in the given scope.
315
+ #
316
+ # @overload get(request, options = nil)
317
+ # Pass arguments to `get` via a request object, either of type
318
+ # {::Google::Cloud::Compute::V1::GetWireGroupRequest} or an equivalent Hash.
319
+ #
320
+ # @param request [::Google::Cloud::Compute::V1::GetWireGroupRequest, ::Hash]
321
+ # A request object representing the call parameters. Required. To specify no
322
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
323
+ # @param options [::Gapic::CallOptions, ::Hash]
324
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
325
+ #
326
+ # @overload get(cross_site_network: nil, project: nil, wire_group: nil)
327
+ # Pass arguments to `get` via keyword arguments. Note that at
328
+ # least one keyword argument is required. To specify no parameters, or to keep all
329
+ # the default parameter values, pass an empty Hash as a request object (see above).
330
+ #
331
+ # @param cross_site_network [::String]
332
+ # @param project [::String]
333
+ # Project ID for this request.
334
+ # @param wire_group [::String]
335
+ # Name of the wire group resource to return.
336
+ # @yield [result, operation] Access the result along with the TransportOperation object
337
+ # @yieldparam result [::Google::Cloud::Compute::V1::WireGroup]
338
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
339
+ #
340
+ # @return [::Google::Cloud::Compute::V1::WireGroup]
341
+ #
342
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
343
+ #
344
+ # @example Basic example
345
+ # require "google/cloud/compute/v1"
346
+ #
347
+ # # Create a client object. The client can be reused for multiple calls.
348
+ # client = Google::Cloud::Compute::V1::WireGroups::Rest::Client.new
349
+ #
350
+ # # Create a request. To set request fields, pass in keyword arguments.
351
+ # request = Google::Cloud::Compute::V1::GetWireGroupRequest.new
352
+ #
353
+ # # Call the get method.
354
+ # result = client.get request
355
+ #
356
+ # # The returned object is of type Google::Cloud::Compute::V1::WireGroup.
357
+ # p result
358
+ #
359
+ def get request, options = nil
360
+ raise ::ArgumentError, "request must be provided" if request.nil?
361
+
362
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetWireGroupRequest
363
+
364
+ # Converts hash and nil to an options object
365
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
366
+
367
+ # Customize the options with defaults
368
+ call_metadata = @config.rpcs.get.metadata.to_h
369
+
370
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
371
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
372
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
373
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
374
+ transports_version_send: [:rest]
375
+
376
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
377
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
378
+
379
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
380
+ metadata: call_metadata,
381
+ retry_policy: @config.rpcs.get.retry_policy
382
+
383
+ options.apply_defaults timeout: @config.timeout,
384
+ metadata: @config.metadata,
385
+ retry_policy: @config.retry_policy
386
+
387
+ @wire_groups_stub.get request, options do |result, operation|
388
+ yield result, operation if block_given?
389
+ end
390
+ rescue ::Gapic::Rest::Error => e
391
+ raise ::Google::Cloud::Error.from_error(e)
392
+ end
393
+
394
+ ##
395
+ # Creates a wire group in the specified project in the given scope
396
+ # using the parameters that are included in the request.
397
+ #
398
+ # @overload insert(request, options = nil)
399
+ # Pass arguments to `insert` via a request object, either of type
400
+ # {::Google::Cloud::Compute::V1::InsertWireGroupRequest} or an equivalent Hash.
401
+ #
402
+ # @param request [::Google::Cloud::Compute::V1::InsertWireGroupRequest, ::Hash]
403
+ # A request object representing the call parameters. Required. To specify no
404
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
405
+ # @param options [::Gapic::CallOptions, ::Hash]
406
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
407
+ #
408
+ # @overload insert(cross_site_network: nil, project: nil, request_id: nil, validate_only: nil, wire_group_resource: nil)
409
+ # Pass arguments to `insert` via keyword arguments. Note that at
410
+ # least one keyword argument is required. To specify no parameters, or to keep all
411
+ # the default parameter values, pass an empty Hash as a request object (see above).
412
+ #
413
+ # @param cross_site_network [::String]
414
+ # @param project [::String]
415
+ # Project ID for this request.
416
+ # @param request_id [::String]
417
+ # An optional request ID to identify requests. Specify a unique request ID so
418
+ # that if you must retry your request, the server will know to ignore the
419
+ # request if it has already been completed.
420
+ #
421
+ # For example, consider a situation where you make an initial request and
422
+ # the request times out. If you make the request again with the same
423
+ # request ID, the server can check if original operation with the same
424
+ # request ID was received, and if so, will ignore the second request. This
425
+ # prevents clients from accidentally creating duplicate commitments.
426
+ #
427
+ # The request ID must be
428
+ # a valid UUID with the exception that zero UUID is not supported
429
+ # (00000000-0000-0000-0000-000000000000).
430
+ # end_interface: MixerMutationRequestBuilder
431
+ # @param validate_only [::Boolean]
432
+ # [Input Only] Validate the new configuration, but don't create it.
433
+ # @param wire_group_resource [::Google::Cloud::Compute::V1::WireGroup, ::Hash]
434
+ # The body resource for this request
435
+ # @yield [result, operation] Access the result along with the TransportOperation object
436
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
437
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
438
+ #
439
+ # @return [::Gapic::GenericLRO::Operation]
440
+ #
441
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
442
+ #
443
+ # @example Basic example
444
+ # require "google/cloud/compute/v1"
445
+ #
446
+ # # Create a client object. The client can be reused for multiple calls.
447
+ # client = Google::Cloud::Compute::V1::WireGroups::Rest::Client.new
448
+ #
449
+ # # Create a request. To set request fields, pass in keyword arguments.
450
+ # request = Google::Cloud::Compute::V1::InsertWireGroupRequest.new
451
+ #
452
+ # # Call the insert method.
453
+ # result = client.insert request
454
+ #
455
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
456
+ # p result
457
+ #
458
+ def insert request, options = nil
459
+ raise ::ArgumentError, "request must be provided" if request.nil?
460
+
461
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertWireGroupRequest
462
+
463
+ # Converts hash and nil to an options object
464
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
465
+
466
+ # Customize the options with defaults
467
+ call_metadata = @config.rpcs.insert.metadata.to_h
468
+
469
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
470
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
471
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
472
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
473
+ transports_version_send: [:rest]
474
+
475
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
476
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
+
478
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
479
+ metadata: call_metadata,
480
+ retry_policy: @config.rpcs.insert.retry_policy
481
+
482
+ options.apply_defaults timeout: @config.timeout,
483
+ metadata: @config.metadata,
484
+ retry_policy: @config.retry_policy
485
+
486
+ @wire_groups_stub.insert request, options do |result, response|
487
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
488
+ operation: result,
489
+ client: global_operations,
490
+ request_values: {
491
+ "project" => request.project
492
+ },
493
+ options: options
494
+ )
495
+ yield result, response if block_given?
496
+ throw :response, result
497
+ end
498
+ rescue ::Gapic::Rest::Error => e
499
+ raise ::Google::Cloud::Error.from_error(e)
500
+ end
501
+
502
+ ##
503
+ # Lists the wire groups for a project in the given scope.
504
+ #
505
+ # @overload list(request, options = nil)
506
+ # Pass arguments to `list` via a request object, either of type
507
+ # {::Google::Cloud::Compute::V1::ListWireGroupsRequest} or an equivalent Hash.
508
+ #
509
+ # @param request [::Google::Cloud::Compute::V1::ListWireGroupsRequest, ::Hash]
510
+ # A request object representing the call parameters. Required. To specify no
511
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
512
+ # @param options [::Gapic::CallOptions, ::Hash]
513
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
514
+ #
515
+ # @overload list(cross_site_network: nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
516
+ # Pass arguments to `list` via keyword arguments. Note that at
517
+ # least one keyword argument is required. To specify no parameters, or to keep all
518
+ # the default parameter values, pass an empty Hash as a request object (see above).
519
+ #
520
+ # @param cross_site_network [::String]
521
+ # @param filter [::String]
522
+ # A filter expression that filters resources listed in the response. Most
523
+ # Compute resources support two types of filter expressions:
524
+ # expressions that support regular expressions and expressions that follow
525
+ # API improvement proposal AIP-160.
526
+ # These two types of filter expressions cannot be mixed in one request.
527
+ #
528
+ # If you want to use AIP-160, your expression must specify the field name, an
529
+ # operator, and the value that you want to use for filtering. The value
530
+ # must be a string, a number, or a boolean. The operator
531
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
532
+ #
533
+ # For example, if you are filtering Compute Engine instances, you can
534
+ # exclude instances named `example-instance` by specifying
535
+ # `name != example-instance`.
536
+ #
537
+ # The `:*` comparison can be used to test whether a key has been defined.
538
+ # For example, to find all objects with `owner` label use:
539
+ # ```
540
+ # labels.owner:*
541
+ # ```
542
+ #
543
+ # You can also filter nested fields. For example, you could specify
544
+ # `scheduling.automaticRestart = false` to include instances only
545
+ # if they are not scheduled for automatic restarts. You can use filtering
546
+ # on nested fields to filter based onresource labels.
547
+ #
548
+ # To filter on multiple expressions, provide each separate expression within
549
+ # parentheses. For example:
550
+ # ```
551
+ # (scheduling.automaticRestart = true)
552
+ # (cpuPlatform = "Intel Skylake")
553
+ # ```
554
+ # By default, each expression is an `AND` expression. However, you
555
+ # can include `AND` and `OR` expressions explicitly.
556
+ # For example:
557
+ # ```
558
+ # (cpuPlatform = "Intel Skylake") OR
559
+ # (cpuPlatform = "Intel Broadwell") AND
560
+ # (scheduling.automaticRestart = true)
561
+ # ```
562
+ #
563
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
564
+ # (not equal) operator against a single un-parenthesized expression with or
565
+ # without quotes or against multiple parenthesized expressions. Examples:
566
+ #
567
+ # `fieldname eq unquoted literal`
568
+ # `fieldname eq 'single quoted literal'`
569
+ # `fieldname eq "double quoted literal"`
570
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
571
+ #
572
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
573
+ # The literal value must match the entire field.
574
+ #
575
+ # For example, to filter for instances that do not end with name "instance",
576
+ # you would use `name ne .*instance`.
577
+ #
578
+ # You cannot combine constraints on multiple fields using regular
579
+ # expressions.
580
+ # @param max_results [::Integer]
581
+ # The maximum number of results per page that should be returned.
582
+ # If the number of available results is larger than `maxResults`,
583
+ # Compute Engine returns a `nextPageToken` that can be used to get
584
+ # the next page of results in subsequent list requests. Acceptable values are
585
+ # `0` to `500`, inclusive. (Default: `500`)
586
+ # @param order_by [::String]
587
+ # Sorts list results by a certain order. By default, results
588
+ # are returned in alphanumerical order based on the resource name.
589
+ #
590
+ # You can also sort results in descending order based on the creation
591
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
592
+ # results based on the `creationTimestamp` field in
593
+ # reverse chronological order (newest result first). Use this to sort
594
+ # resources like operations so that the newest operation is returned first.
595
+ #
596
+ # Currently, only sorting by `name` or
597
+ # `creationTimestamp desc` is supported.
598
+ # @param page_token [::String]
599
+ # Specifies a page token to use. Set `pageToken` to the
600
+ # `nextPageToken` returned by a previous list request to get
601
+ # the next page of results.
602
+ # @param project [::String]
603
+ # Project ID for this request.
604
+ # @param return_partial_success [::Boolean]
605
+ # Opt-in for partial success behavior which provides partial results in case
606
+ # of failure. The default value is false.
607
+ #
608
+ # For example, when partial success behavior is enabled, aggregatedList for a
609
+ # single zone scope either returns all resources in the zone or no resources,
610
+ # with an error code.
611
+ # @yield [result, operation] Access the result along with the TransportOperation object
612
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::WireGroup>]
613
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
614
+ #
615
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::WireGroup>]
616
+ #
617
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
618
+ #
619
+ # @example Basic example
620
+ # require "google/cloud/compute/v1"
621
+ #
622
+ # # Create a client object. The client can be reused for multiple calls.
623
+ # client = Google::Cloud::Compute::V1::WireGroups::Rest::Client.new
624
+ #
625
+ # # Create a request. To set request fields, pass in keyword arguments.
626
+ # request = Google::Cloud::Compute::V1::ListWireGroupsRequest.new
627
+ #
628
+ # # Call the list method.
629
+ # result = client.list request
630
+ #
631
+ # # The returned object is of type Google::Cloud::Compute::V1::WireGroupList.
632
+ # p result
633
+ #
634
+ def list request, options = nil
635
+ raise ::ArgumentError, "request must be provided" if request.nil?
636
+
637
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListWireGroupsRequest
638
+
639
+ # Converts hash and nil to an options object
640
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
641
+
642
+ # Customize the options with defaults
643
+ call_metadata = @config.rpcs.list.metadata.to_h
644
+
645
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
646
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
647
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
648
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
649
+ transports_version_send: [:rest]
650
+
651
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
652
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
653
+
654
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
655
+ metadata: call_metadata,
656
+ retry_policy: @config.rpcs.list.retry_policy
657
+
658
+ options.apply_defaults timeout: @config.timeout,
659
+ metadata: @config.metadata,
660
+ retry_policy: @config.retry_policy
661
+
662
+ @wire_groups_stub.list request, options do |result, operation|
663
+ result = ::Gapic::Rest::PagedEnumerable.new @wire_groups_stub, :list, "items", request, result, options
664
+ yield result, operation if block_given?
665
+ throw :response, result
666
+ end
667
+ rescue ::Gapic::Rest::Error => e
668
+ raise ::Google::Cloud::Error.from_error(e)
669
+ end
670
+
671
+ ##
672
+ # Updates the specified wire group resource with the data included in the
673
+ # request. This method supportsPATCH
674
+ # semantics and usesJSON merge
675
+ # patch format and processing rules.
676
+ #
677
+ # @overload patch(request, options = nil)
678
+ # Pass arguments to `patch` via a request object, either of type
679
+ # {::Google::Cloud::Compute::V1::PatchWireGroupRequest} or an equivalent Hash.
680
+ #
681
+ # @param request [::Google::Cloud::Compute::V1::PatchWireGroupRequest, ::Hash]
682
+ # A request object representing the call parameters. Required. To specify no
683
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
684
+ # @param options [::Gapic::CallOptions, ::Hash]
685
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
686
+ #
687
+ # @overload patch(cross_site_network: nil, project: nil, request_id: nil, update_mask: nil, validate_only: nil, wire_group: nil, wire_group_resource: nil)
688
+ # Pass arguments to `patch` via keyword arguments. Note that at
689
+ # least one keyword argument is required. To specify no parameters, or to keep all
690
+ # the default parameter values, pass an empty Hash as a request object (see above).
691
+ #
692
+ # @param cross_site_network [::String]
693
+ # @param project [::String]
694
+ # Project ID for this request.
695
+ # @param request_id [::String]
696
+ # An optional request ID to identify requests. Specify a unique request ID so
697
+ # that if you must retry your request, the server will know to ignore the
698
+ # request if it has already been completed.
699
+ #
700
+ # For example, consider a situation where you make an initial request and
701
+ # the request times out. If you make the request again with the same
702
+ # request ID, the server can check if original operation with the same
703
+ # request ID was received, and if so, will ignore the second request. This
704
+ # prevents clients from accidentally creating duplicate commitments.
705
+ #
706
+ # The request ID must be
707
+ # a valid UUID with the exception that zero UUID is not supported
708
+ # (00000000-0000-0000-0000-000000000000).
709
+ # end_interface: MixerMutationRequestBuilder
710
+ # @param update_mask [::String]
711
+ # update_mask indicates fields to be updated as part of this request.
712
+ # @param validate_only [::Boolean]
713
+ # [Input Only] Validate the new configuration, but don't update it.
714
+ # @param wire_group [::String]
715
+ # Name of the WireGroups resource to patch.
716
+ # @param wire_group_resource [::Google::Cloud::Compute::V1::WireGroup, ::Hash]
717
+ # The body resource for this request
718
+ # @yield [result, operation] Access the result along with the TransportOperation object
719
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
720
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
721
+ #
722
+ # @return [::Gapic::GenericLRO::Operation]
723
+ #
724
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
725
+ #
726
+ # @example Basic example
727
+ # require "google/cloud/compute/v1"
728
+ #
729
+ # # Create a client object. The client can be reused for multiple calls.
730
+ # client = Google::Cloud::Compute::V1::WireGroups::Rest::Client.new
731
+ #
732
+ # # Create a request. To set request fields, pass in keyword arguments.
733
+ # request = Google::Cloud::Compute::V1::PatchWireGroupRequest.new
734
+ #
735
+ # # Call the patch method.
736
+ # result = client.patch request
737
+ #
738
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
739
+ # p result
740
+ #
741
+ def patch request, options = nil
742
+ raise ::ArgumentError, "request must be provided" if request.nil?
743
+
744
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchWireGroupRequest
745
+
746
+ # Converts hash and nil to an options object
747
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
748
+
749
+ # Customize the options with defaults
750
+ call_metadata = @config.rpcs.patch.metadata.to_h
751
+
752
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
753
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
754
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
755
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
756
+ transports_version_send: [:rest]
757
+
758
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
759
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
760
+
761
+ options.apply_defaults timeout: @config.rpcs.patch.timeout,
762
+ metadata: call_metadata,
763
+ retry_policy: @config.rpcs.patch.retry_policy
764
+
765
+ options.apply_defaults timeout: @config.timeout,
766
+ metadata: @config.metadata,
767
+ retry_policy: @config.retry_policy
768
+
769
+ @wire_groups_stub.patch request, options do |result, response|
770
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
771
+ operation: result,
772
+ client: global_operations,
773
+ request_values: {
774
+ "project" => request.project
775
+ },
776
+ options: options
777
+ )
778
+ yield result, response if block_given?
779
+ throw :response, result
780
+ end
781
+ rescue ::Gapic::Rest::Error => e
782
+ raise ::Google::Cloud::Error.from_error(e)
783
+ end
784
+
785
+ ##
786
+ # Configuration class for the WireGroups REST API.
787
+ #
788
+ # This class represents the configuration for WireGroups REST,
789
+ # providing control over timeouts, retry behavior, logging, transport
790
+ # parameters, and other low-level controls. Certain parameters can also be
791
+ # applied individually to specific RPCs. See
792
+ # {::Google::Cloud::Compute::V1::WireGroups::Rest::Client::Configuration::Rpcs}
793
+ # for a list of RPCs that can be configured independently.
794
+ #
795
+ # Configuration can be applied globally to all clients, or to a single client
796
+ # on construction.
797
+ #
798
+ # @example
799
+ #
800
+ # # Modify the global config, setting the timeout for
801
+ # # delete to 20 seconds,
802
+ # # and all remaining timeouts to 10 seconds.
803
+ # ::Google::Cloud::Compute::V1::WireGroups::Rest::Client.configure do |config|
804
+ # config.timeout = 10.0
805
+ # config.rpcs.delete.timeout = 20.0
806
+ # end
807
+ #
808
+ # # Apply the above configuration only to a new client.
809
+ # client = ::Google::Cloud::Compute::V1::WireGroups::Rest::Client.new do |config|
810
+ # config.timeout = 10.0
811
+ # config.rpcs.delete.timeout = 20.0
812
+ # end
813
+ #
814
+ # @!attribute [rw] endpoint
815
+ # A custom service endpoint, as a hostname or hostname:port. The default is
816
+ # nil, indicating to use the default endpoint in the current universe domain.
817
+ # @return [::String,nil]
818
+ # @!attribute [rw] credentials
819
+ # Credentials to send with calls. You may provide any of the following types:
820
+ # * (`String`) The path to a service account key file in JSON format
821
+ # * (`Hash`) A service account key as a Hash
822
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
823
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
824
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
825
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
826
+ # * (`nil`) indicating no credentials
827
+ #
828
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
829
+ # external source for authentication to Google Cloud, you must validate it before
830
+ # providing it to a Google API client library. Providing an unvalidated credential
831
+ # configuration to Google APIs can compromise the security of your systems and data.
832
+ # For more information, refer to [Validate credential configurations from external
833
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
834
+ # @return [::Object]
835
+ # @!attribute [rw] scope
836
+ # The OAuth scopes
837
+ # @return [::Array<::String>]
838
+ # @!attribute [rw] lib_name
839
+ # The library name as recorded in instrumentation and logging
840
+ # @return [::String]
841
+ # @!attribute [rw] lib_version
842
+ # The library version as recorded in instrumentation and logging
843
+ # @return [::String]
844
+ # @!attribute [rw] timeout
845
+ # The call timeout in seconds.
846
+ # @return [::Numeric]
847
+ # @!attribute [rw] metadata
848
+ # Additional headers to be sent with the call.
849
+ # @return [::Hash{::Symbol=>::String}]
850
+ # @!attribute [rw] retry_policy
851
+ # The retry policy. The value is a hash with the following keys:
852
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
853
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
854
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
855
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
856
+ # trigger a retry.
857
+ # @return [::Hash]
858
+ # @!attribute [rw] quota_project
859
+ # A separate project against which to charge quota.
860
+ # @return [::String]
861
+ # @!attribute [rw] universe_domain
862
+ # The universe domain within which to make requests. This determines the
863
+ # default endpoint URL. The default value of nil uses the environment
864
+ # universe (usually the default "googleapis.com" universe).
865
+ # @return [::String,nil]
866
+ # @!attribute [rw] logger
867
+ # A custom logger to use for request/response debug logging, or the value
868
+ # `:default` (the default) to construct a default logger, or `nil` to
869
+ # explicitly disable logging.
870
+ # @return [::Logger,:default,nil]
871
+ #
872
+ class Configuration
873
+ extend ::Gapic::Config
874
+
875
+ # @private
876
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
877
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
878
+
879
+ config_attr :endpoint, nil, ::String, nil
880
+ config_attr :credentials, nil do |value|
881
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
882
+ allowed.any? { |klass| klass === value }
883
+ end
884
+ config_attr :scope, nil, ::String, ::Array, nil
885
+ config_attr :lib_name, nil, ::String, nil
886
+ config_attr :lib_version, nil, ::String, nil
887
+ config_attr :timeout, nil, ::Numeric, nil
888
+ config_attr :metadata, nil, ::Hash, nil
889
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
890
+ config_attr :quota_project, nil, ::String, nil
891
+ config_attr :universe_domain, nil, ::String, nil
892
+ config_attr :logger, :default, ::Logger, nil, :default
893
+
894
+ # @private
895
+ def initialize parent_config = nil
896
+ @parent_config = parent_config unless parent_config.nil?
897
+
898
+ yield self if block_given?
899
+ end
900
+
901
+ ##
902
+ # Configurations for individual RPCs
903
+ # @return [Rpcs]
904
+ #
905
+ def rpcs
906
+ @rpcs ||= begin
907
+ parent_rpcs = nil
908
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
909
+ Rpcs.new parent_rpcs
910
+ end
911
+ end
912
+
913
+ ##
914
+ # Configuration RPC class for the WireGroups API.
915
+ #
916
+ # Includes fields providing the configuration for each RPC in this service.
917
+ # Each configuration object is of type `Gapic::Config::Method` and includes
918
+ # the following configuration fields:
919
+ #
920
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
921
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
922
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
923
+ # include the following keys:
924
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
925
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
926
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
927
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
928
+ # trigger a retry.
929
+ #
930
+ class Rpcs
931
+ ##
932
+ # RPC-specific configuration for `delete`
933
+ # @return [::Gapic::Config::Method]
934
+ #
935
+ attr_reader :delete
936
+ ##
937
+ # RPC-specific configuration for `get`
938
+ # @return [::Gapic::Config::Method]
939
+ #
940
+ attr_reader :get
941
+ ##
942
+ # RPC-specific configuration for `insert`
943
+ # @return [::Gapic::Config::Method]
944
+ #
945
+ attr_reader :insert
946
+ ##
947
+ # RPC-specific configuration for `list`
948
+ # @return [::Gapic::Config::Method]
949
+ #
950
+ attr_reader :list
951
+ ##
952
+ # RPC-specific configuration for `patch`
953
+ # @return [::Gapic::Config::Method]
954
+ #
955
+ attr_reader :patch
956
+
957
+ # @private
958
+ def initialize parent_rpcs = nil
959
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
960
+ @delete = ::Gapic::Config::Method.new delete_config
961
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
962
+ @get = ::Gapic::Config::Method.new get_config
963
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
964
+ @insert = ::Gapic::Config::Method.new insert_config
965
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
966
+ @list = ::Gapic::Config::Method.new list_config
967
+ patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
968
+ @patch = ::Gapic::Config::Method.new patch_config
969
+
970
+ yield self if block_given?
971
+ end
972
+ end
973
+ end
974
+ end
975
+ end
976
+ end
977
+ end
978
+ end
979
+ end
980
+ end