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,975 @@
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/cross_site_networks/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 CrossSiteNetworks
29
+ module Rest
30
+ ##
31
+ # REST client for the CrossSiteNetworks service.
32
+ #
33
+ # The CrossSiteNetworks 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 :cross_site_networks_stub
44
+
45
+ ##
46
+ # Configure the CrossSiteNetworks Client class.
47
+ #
48
+ # See {::Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all CrossSiteNetworks clients
54
+ # ::Google::Cloud::Compute::V1::CrossSiteNetworks::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 CrossSiteNetworks 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::CrossSiteNetworks::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
+ @cross_site_networks_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new CrossSiteNetworks REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the CrossSiteNetworks 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
+ @cross_site_networks_stub = ::Google::Cloud::Compute::V1::CrossSiteNetworks::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
+ @cross_site_networks_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
+ @cross_site_networks_stub.logger
204
+ end
205
+
206
+ # Service calls
207
+
208
+ ##
209
+ # Deletes the specified cross-site network 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::DeleteCrossSiteNetworkRequest} or an equivalent Hash.
214
+ #
215
+ # @param request [::Google::Cloud::Compute::V1::DeleteCrossSiteNetworkRequest, ::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)
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
+ # Name of the cross-site network to delete.
228
+ # @param project [::String]
229
+ # Project ID for this request.
230
+ # @param request_id [::String]
231
+ # An optional request ID to identify requests. Specify a unique request ID so
232
+ # that if you must retry your request, the server will know to ignore the
233
+ # request if it has already been completed.
234
+ #
235
+ # For example, consider a situation where you make an initial request and
236
+ # the request times out. If you make the request again with the same
237
+ # request ID, the server can check if original operation with the same
238
+ # request ID was received, and if so, will ignore the second request. This
239
+ # prevents clients from accidentally creating duplicate commitments.
240
+ #
241
+ # The request ID must be
242
+ # a valid UUID with the exception that zero UUID is not supported
243
+ # (00000000-0000-0000-0000-000000000000).
244
+ # end_interface: MixerMutationRequestBuilder
245
+ # @yield [result, operation] Access the result along with the TransportOperation object
246
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
247
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
248
+ #
249
+ # @return [::Gapic::GenericLRO::Operation]
250
+ #
251
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
252
+ #
253
+ # @example Basic example
254
+ # require "google/cloud/compute/v1"
255
+ #
256
+ # # Create a client object. The client can be reused for multiple calls.
257
+ # client = Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new
258
+ #
259
+ # # Create a request. To set request fields, pass in keyword arguments.
260
+ # request = Google::Cloud::Compute::V1::DeleteCrossSiteNetworkRequest.new
261
+ #
262
+ # # Call the delete method.
263
+ # result = client.delete request
264
+ #
265
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
266
+ # p result
267
+ #
268
+ def delete request, options = nil
269
+ raise ::ArgumentError, "request must be provided" if request.nil?
270
+
271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteCrossSiteNetworkRequest
272
+
273
+ # Converts hash and nil to an options object
274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
275
+
276
+ # Customize the options with defaults
277
+ call_metadata = @config.rpcs.delete.metadata.to_h
278
+
279
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
280
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
282
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
283
+ transports_version_send: [:rest]
284
+
285
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
286
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
+
288
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
289
+ metadata: call_metadata,
290
+ retry_policy: @config.rpcs.delete.retry_policy
291
+
292
+ options.apply_defaults timeout: @config.timeout,
293
+ metadata: @config.metadata,
294
+ retry_policy: @config.retry_policy
295
+
296
+ @cross_site_networks_stub.delete request, options do |result, response|
297
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
298
+ operation: result,
299
+ client: global_operations,
300
+ request_values: {
301
+ "project" => request.project
302
+ },
303
+ options: options
304
+ )
305
+ yield result, response if block_given?
306
+ throw :response, result
307
+ end
308
+ rescue ::Gapic::Rest::Error => e
309
+ raise ::Google::Cloud::Error.from_error(e)
310
+ end
311
+
312
+ ##
313
+ # Returns the specified cross-site network in the given scope.
314
+ #
315
+ # @overload get(request, options = nil)
316
+ # Pass arguments to `get` via a request object, either of type
317
+ # {::Google::Cloud::Compute::V1::GetCrossSiteNetworkRequest} or an equivalent Hash.
318
+ #
319
+ # @param request [::Google::Cloud::Compute::V1::GetCrossSiteNetworkRequest, ::Hash]
320
+ # A request object representing the call parameters. Required. To specify no
321
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
322
+ # @param options [::Gapic::CallOptions, ::Hash]
323
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
324
+ #
325
+ # @overload get(cross_site_network: nil, project: nil)
326
+ # Pass arguments to `get` via keyword arguments. Note that at
327
+ # least one keyword argument is required. To specify no parameters, or to keep all
328
+ # the default parameter values, pass an empty Hash as a request object (see above).
329
+ #
330
+ # @param cross_site_network [::String]
331
+ # Name of the cross-site network to return.
332
+ # @param project [::String]
333
+ # Project ID for this request.
334
+ # @yield [result, operation] Access the result along with the TransportOperation object
335
+ # @yieldparam result [::Google::Cloud::Compute::V1::CrossSiteNetwork]
336
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
337
+ #
338
+ # @return [::Google::Cloud::Compute::V1::CrossSiteNetwork]
339
+ #
340
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
341
+ #
342
+ # @example Basic example
343
+ # require "google/cloud/compute/v1"
344
+ #
345
+ # # Create a client object. The client can be reused for multiple calls.
346
+ # client = Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new
347
+ #
348
+ # # Create a request. To set request fields, pass in keyword arguments.
349
+ # request = Google::Cloud::Compute::V1::GetCrossSiteNetworkRequest.new
350
+ #
351
+ # # Call the get method.
352
+ # result = client.get request
353
+ #
354
+ # # The returned object is of type Google::Cloud::Compute::V1::CrossSiteNetwork.
355
+ # p result
356
+ #
357
+ def get request, options = nil
358
+ raise ::ArgumentError, "request must be provided" if request.nil?
359
+
360
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetCrossSiteNetworkRequest
361
+
362
+ # Converts hash and nil to an options object
363
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
364
+
365
+ # Customize the options with defaults
366
+ call_metadata = @config.rpcs.get.metadata.to_h
367
+
368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
369
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
370
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
371
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
372
+ transports_version_send: [:rest]
373
+
374
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
375
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
+
377
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
378
+ metadata: call_metadata,
379
+ retry_policy: @config.rpcs.get.retry_policy
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
383
+ retry_policy: @config.retry_policy
384
+
385
+ @cross_site_networks_stub.get request, options do |result, operation|
386
+ yield result, operation if block_given?
387
+ end
388
+ rescue ::Gapic::Rest::Error => e
389
+ raise ::Google::Cloud::Error.from_error(e)
390
+ end
391
+
392
+ ##
393
+ # Creates a cross-site network in the specified project in the given scope
394
+ # using the parameters that are included in the request.
395
+ #
396
+ # @overload insert(request, options = nil)
397
+ # Pass arguments to `insert` via a request object, either of type
398
+ # {::Google::Cloud::Compute::V1::InsertCrossSiteNetworkRequest} or an equivalent Hash.
399
+ #
400
+ # @param request [::Google::Cloud::Compute::V1::InsertCrossSiteNetworkRequest, ::Hash]
401
+ # A request object representing the call parameters. Required. To specify no
402
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
403
+ # @param options [::Gapic::CallOptions, ::Hash]
404
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
405
+ #
406
+ # @overload insert(cross_site_network_resource: nil, project: nil, request_id: nil, validate_only: nil)
407
+ # Pass arguments to `insert` via keyword arguments. Note that at
408
+ # least one keyword argument is required. To specify no parameters, or to keep all
409
+ # the default parameter values, pass an empty Hash as a request object (see above).
410
+ #
411
+ # @param cross_site_network_resource [::Google::Cloud::Compute::V1::CrossSiteNetwork, ::Hash]
412
+ # The body resource for this request
413
+ # @param project [::String]
414
+ # Project ID for this request.
415
+ # @param request_id [::String]
416
+ # An optional request ID to identify requests. Specify a unique request ID so
417
+ # that if you must retry your request, the server will know to ignore the
418
+ # request if it has already been completed.
419
+ #
420
+ # For example, consider a situation where you make an initial request and
421
+ # the request times out. If you make the request again with the same
422
+ # request ID, the server can check if original operation with the same
423
+ # request ID was received, and if so, will ignore the second request. This
424
+ # prevents clients from accidentally creating duplicate commitments.
425
+ #
426
+ # The request ID must be
427
+ # a valid UUID with the exception that zero UUID is not supported
428
+ # (00000000-0000-0000-0000-000000000000).
429
+ # end_interface: MixerMutationRequestBuilder
430
+ # @param validate_only [::Boolean]
431
+ # [Input Only] Validate the new configuration, but don't create it.
432
+ # @yield [result, operation] Access the result along with the TransportOperation object
433
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
434
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
435
+ #
436
+ # @return [::Gapic::GenericLRO::Operation]
437
+ #
438
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
439
+ #
440
+ # @example Basic example
441
+ # require "google/cloud/compute/v1"
442
+ #
443
+ # # Create a client object. The client can be reused for multiple calls.
444
+ # client = Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new
445
+ #
446
+ # # Create a request. To set request fields, pass in keyword arguments.
447
+ # request = Google::Cloud::Compute::V1::InsertCrossSiteNetworkRequest.new
448
+ #
449
+ # # Call the insert method.
450
+ # result = client.insert request
451
+ #
452
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
453
+ # p result
454
+ #
455
+ def insert request, options = nil
456
+ raise ::ArgumentError, "request must be provided" if request.nil?
457
+
458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertCrossSiteNetworkRequest
459
+
460
+ # Converts hash and nil to an options object
461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
462
+
463
+ # Customize the options with defaults
464
+ call_metadata = @config.rpcs.insert.metadata.to_h
465
+
466
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
467
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
469
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
470
+ transports_version_send: [:rest]
471
+
472
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
473
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
+
475
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
476
+ metadata: call_metadata,
477
+ retry_policy: @config.rpcs.insert.retry_policy
478
+
479
+ options.apply_defaults timeout: @config.timeout,
480
+ metadata: @config.metadata,
481
+ retry_policy: @config.retry_policy
482
+
483
+ @cross_site_networks_stub.insert request, options do |result, response|
484
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
485
+ operation: result,
486
+ client: global_operations,
487
+ request_values: {
488
+ "project" => request.project
489
+ },
490
+ options: options
491
+ )
492
+ yield result, response if block_given?
493
+ throw :response, result
494
+ end
495
+ rescue ::Gapic::Rest::Error => e
496
+ raise ::Google::Cloud::Error.from_error(e)
497
+ end
498
+
499
+ ##
500
+ # Lists the cross-site networks for a project in the given scope.
501
+ #
502
+ # @overload list(request, options = nil)
503
+ # Pass arguments to `list` via a request object, either of type
504
+ # {::Google::Cloud::Compute::V1::ListCrossSiteNetworksRequest} or an equivalent Hash.
505
+ #
506
+ # @param request [::Google::Cloud::Compute::V1::ListCrossSiteNetworksRequest, ::Hash]
507
+ # A request object representing the call parameters. Required. To specify no
508
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
509
+ # @param options [::Gapic::CallOptions, ::Hash]
510
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
511
+ #
512
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
513
+ # Pass arguments to `list` via keyword arguments. Note that at
514
+ # least one keyword argument is required. To specify no parameters, or to keep all
515
+ # the default parameter values, pass an empty Hash as a request object (see above).
516
+ #
517
+ # @param filter [::String]
518
+ # A filter expression that filters resources listed in the response. Most
519
+ # Compute resources support two types of filter expressions:
520
+ # expressions that support regular expressions and expressions that follow
521
+ # API improvement proposal AIP-160.
522
+ # These two types of filter expressions cannot be mixed in one request.
523
+ #
524
+ # If you want to use AIP-160, your expression must specify the field name, an
525
+ # operator, and the value that you want to use for filtering. The value
526
+ # must be a string, a number, or a boolean. The operator
527
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
528
+ #
529
+ # For example, if you are filtering Compute Engine instances, you can
530
+ # exclude instances named `example-instance` by specifying
531
+ # `name != example-instance`.
532
+ #
533
+ # The `:*` comparison can be used to test whether a key has been defined.
534
+ # For example, to find all objects with `owner` label use:
535
+ # ```
536
+ # labels.owner:*
537
+ # ```
538
+ #
539
+ # You can also filter nested fields. For example, you could specify
540
+ # `scheduling.automaticRestart = false` to include instances only
541
+ # if they are not scheduled for automatic restarts. You can use filtering
542
+ # on nested fields to filter based onresource labels.
543
+ #
544
+ # To filter on multiple expressions, provide each separate expression within
545
+ # parentheses. For example:
546
+ # ```
547
+ # (scheduling.automaticRestart = true)
548
+ # (cpuPlatform = "Intel Skylake")
549
+ # ```
550
+ # By default, each expression is an `AND` expression. However, you
551
+ # can include `AND` and `OR` expressions explicitly.
552
+ # For example:
553
+ # ```
554
+ # (cpuPlatform = "Intel Skylake") OR
555
+ # (cpuPlatform = "Intel Broadwell") AND
556
+ # (scheduling.automaticRestart = true)
557
+ # ```
558
+ #
559
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
560
+ # (not equal) operator against a single un-parenthesized expression with or
561
+ # without quotes or against multiple parenthesized expressions. Examples:
562
+ #
563
+ # `fieldname eq unquoted literal`
564
+ # `fieldname eq 'single quoted literal'`
565
+ # `fieldname eq "double quoted literal"`
566
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
567
+ #
568
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
569
+ # The literal value must match the entire field.
570
+ #
571
+ # For example, to filter for instances that do not end with name "instance",
572
+ # you would use `name ne .*instance`.
573
+ #
574
+ # You cannot combine constraints on multiple fields using regular
575
+ # expressions.
576
+ # @param max_results [::Integer]
577
+ # The maximum number of results per page that should be returned.
578
+ # If the number of available results is larger than `maxResults`,
579
+ # Compute Engine returns a `nextPageToken` that can be used to get
580
+ # the next page of results in subsequent list requests. Acceptable values are
581
+ # `0` to `500`, inclusive. (Default: `500`)
582
+ # @param order_by [::String]
583
+ # Sorts list results by a certain order. By default, results
584
+ # are returned in alphanumerical order based on the resource name.
585
+ #
586
+ # You can also sort results in descending order based on the creation
587
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
588
+ # results based on the `creationTimestamp` field in
589
+ # reverse chronological order (newest result first). Use this to sort
590
+ # resources like operations so that the newest operation is returned first.
591
+ #
592
+ # Currently, only sorting by `name` or
593
+ # `creationTimestamp desc` is supported.
594
+ # @param page_token [::String]
595
+ # Specifies a page token to use. Set `pageToken` to the
596
+ # `nextPageToken` returned by a previous list request to get
597
+ # the next page of results.
598
+ # @param project [::String]
599
+ # Project ID for this request.
600
+ # @param return_partial_success [::Boolean]
601
+ # Opt-in for partial success behavior which provides partial results in case
602
+ # of failure. The default value is false.
603
+ #
604
+ # For example, when partial success behavior is enabled, aggregatedList for a
605
+ # single zone scope either returns all resources in the zone or no resources,
606
+ # with an error code.
607
+ # @yield [result, operation] Access the result along with the TransportOperation object
608
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::CrossSiteNetwork>]
609
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
610
+ #
611
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::CrossSiteNetwork>]
612
+ #
613
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
614
+ #
615
+ # @example Basic example
616
+ # require "google/cloud/compute/v1"
617
+ #
618
+ # # Create a client object. The client can be reused for multiple calls.
619
+ # client = Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new
620
+ #
621
+ # # Create a request. To set request fields, pass in keyword arguments.
622
+ # request = Google::Cloud::Compute::V1::ListCrossSiteNetworksRequest.new
623
+ #
624
+ # # Call the list method.
625
+ # result = client.list request
626
+ #
627
+ # # The returned object is of type Google::Cloud::Compute::V1::CrossSiteNetworkList.
628
+ # p result
629
+ #
630
+ def list request, options = nil
631
+ raise ::ArgumentError, "request must be provided" if request.nil?
632
+
633
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListCrossSiteNetworksRequest
634
+
635
+ # Converts hash and nil to an options object
636
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
637
+
638
+ # Customize the options with defaults
639
+ call_metadata = @config.rpcs.list.metadata.to_h
640
+
641
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
642
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
643
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
644
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
645
+ transports_version_send: [:rest]
646
+
647
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
648
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
649
+
650
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
651
+ metadata: call_metadata,
652
+ retry_policy: @config.rpcs.list.retry_policy
653
+
654
+ options.apply_defaults timeout: @config.timeout,
655
+ metadata: @config.metadata,
656
+ retry_policy: @config.retry_policy
657
+
658
+ @cross_site_networks_stub.list request, options do |result, operation|
659
+ result = ::Gapic::Rest::PagedEnumerable.new @cross_site_networks_stub, :list, "items", request, result, options
660
+ yield result, operation if block_given?
661
+ throw :response, result
662
+ end
663
+ rescue ::Gapic::Rest::Error => e
664
+ raise ::Google::Cloud::Error.from_error(e)
665
+ end
666
+
667
+ ##
668
+ # Updates the specified cross-site network with the data included in
669
+ # the request. This method supportsPATCH
670
+ # semantics and uses theJSON merge
671
+ # patch format and processing rules.
672
+ #
673
+ # @overload patch(request, options = nil)
674
+ # Pass arguments to `patch` via a request object, either of type
675
+ # {::Google::Cloud::Compute::V1::PatchCrossSiteNetworkRequest} or an equivalent Hash.
676
+ #
677
+ # @param request [::Google::Cloud::Compute::V1::PatchCrossSiteNetworkRequest, ::Hash]
678
+ # A request object representing the call parameters. Required. To specify no
679
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
680
+ # @param options [::Gapic::CallOptions, ::Hash]
681
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
682
+ #
683
+ # @overload patch(cross_site_network: nil, cross_site_network_resource: nil, project: nil, request_id: nil, update_mask: nil, validate_only: nil)
684
+ # Pass arguments to `patch` via keyword arguments. Note that at
685
+ # least one keyword argument is required. To specify no parameters, or to keep all
686
+ # the default parameter values, pass an empty Hash as a request object (see above).
687
+ #
688
+ # @param cross_site_network [::String]
689
+ # Name of the cross-site network to update.
690
+ # @param cross_site_network_resource [::Google::Cloud::Compute::V1::CrossSiteNetwork, ::Hash]
691
+ # The body resource for this request
692
+ # @param project [::String]
693
+ # Project ID for this request.
694
+ # @param request_id [::String]
695
+ # An optional request ID to identify requests. Specify a unique request ID so
696
+ # that if you must retry your request, the server will know to ignore the
697
+ # request if it has already been completed.
698
+ #
699
+ # For example, consider a situation where you make an initial request and
700
+ # the request times out. If you make the request again with the same
701
+ # request ID, the server can check if original operation with the same
702
+ # request ID was received, and if so, will ignore the second request. This
703
+ # prevents clients from accidentally creating duplicate commitments.
704
+ #
705
+ # The request ID must be
706
+ # a valid UUID with the exception that zero UUID is not supported
707
+ # (00000000-0000-0000-0000-000000000000).
708
+ # end_interface: MixerMutationRequestBuilder
709
+ # @param update_mask [::String]
710
+ # update_mask indicates fields to be updated as part of this request.
711
+ # @param validate_only [::Boolean]
712
+ # [Input Only] Validate the new configuration, but don't update it.
713
+ # @yield [result, operation] Access the result along with the TransportOperation object
714
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
715
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
716
+ #
717
+ # @return [::Gapic::GenericLRO::Operation]
718
+ #
719
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
720
+ #
721
+ # @example Basic example
722
+ # require "google/cloud/compute/v1"
723
+ #
724
+ # # Create a client object. The client can be reused for multiple calls.
725
+ # client = Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new
726
+ #
727
+ # # Create a request. To set request fields, pass in keyword arguments.
728
+ # request = Google::Cloud::Compute::V1::PatchCrossSiteNetworkRequest.new
729
+ #
730
+ # # Call the patch method.
731
+ # result = client.patch request
732
+ #
733
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
734
+ # p result
735
+ #
736
+ def patch request, options = nil
737
+ raise ::ArgumentError, "request must be provided" if request.nil?
738
+
739
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchCrossSiteNetworkRequest
740
+
741
+ # Converts hash and nil to an options object
742
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
743
+
744
+ # Customize the options with defaults
745
+ call_metadata = @config.rpcs.patch.metadata.to_h
746
+
747
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
748
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
749
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
750
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
751
+ transports_version_send: [:rest]
752
+
753
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
754
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
755
+
756
+ options.apply_defaults timeout: @config.rpcs.patch.timeout,
757
+ metadata: call_metadata,
758
+ retry_policy: @config.rpcs.patch.retry_policy
759
+
760
+ options.apply_defaults timeout: @config.timeout,
761
+ metadata: @config.metadata,
762
+ retry_policy: @config.retry_policy
763
+
764
+ @cross_site_networks_stub.patch request, options do |result, response|
765
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
766
+ operation: result,
767
+ client: global_operations,
768
+ request_values: {
769
+ "project" => request.project
770
+ },
771
+ options: options
772
+ )
773
+ yield result, response if block_given?
774
+ throw :response, result
775
+ end
776
+ rescue ::Gapic::Rest::Error => e
777
+ raise ::Google::Cloud::Error.from_error(e)
778
+ end
779
+
780
+ ##
781
+ # Configuration class for the CrossSiteNetworks REST API.
782
+ #
783
+ # This class represents the configuration for CrossSiteNetworks REST,
784
+ # providing control over timeouts, retry behavior, logging, transport
785
+ # parameters, and other low-level controls. Certain parameters can also be
786
+ # applied individually to specific RPCs. See
787
+ # {::Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client::Configuration::Rpcs}
788
+ # for a list of RPCs that can be configured independently.
789
+ #
790
+ # Configuration can be applied globally to all clients, or to a single client
791
+ # on construction.
792
+ #
793
+ # @example
794
+ #
795
+ # # Modify the global config, setting the timeout for
796
+ # # delete to 20 seconds,
797
+ # # and all remaining timeouts to 10 seconds.
798
+ # ::Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.configure do |config|
799
+ # config.timeout = 10.0
800
+ # config.rpcs.delete.timeout = 20.0
801
+ # end
802
+ #
803
+ # # Apply the above configuration only to a new client.
804
+ # client = ::Google::Cloud::Compute::V1::CrossSiteNetworks::Rest::Client.new do |config|
805
+ # config.timeout = 10.0
806
+ # config.rpcs.delete.timeout = 20.0
807
+ # end
808
+ #
809
+ # @!attribute [rw] endpoint
810
+ # A custom service endpoint, as a hostname or hostname:port. The default is
811
+ # nil, indicating to use the default endpoint in the current universe domain.
812
+ # @return [::String,nil]
813
+ # @!attribute [rw] credentials
814
+ # Credentials to send with calls. You may provide any of the following types:
815
+ # * (`String`) The path to a service account key file in JSON format
816
+ # * (`Hash`) A service account key as a Hash
817
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
818
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
819
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
820
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
821
+ # * (`nil`) indicating no credentials
822
+ #
823
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
824
+ # external source for authentication to Google Cloud, you must validate it before
825
+ # providing it to a Google API client library. Providing an unvalidated credential
826
+ # configuration to Google APIs can compromise the security of your systems and data.
827
+ # For more information, refer to [Validate credential configurations from external
828
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
829
+ # @return [::Object]
830
+ # @!attribute [rw] scope
831
+ # The OAuth scopes
832
+ # @return [::Array<::String>]
833
+ # @!attribute [rw] lib_name
834
+ # The library name as recorded in instrumentation and logging
835
+ # @return [::String]
836
+ # @!attribute [rw] lib_version
837
+ # The library version as recorded in instrumentation and logging
838
+ # @return [::String]
839
+ # @!attribute [rw] timeout
840
+ # The call timeout in seconds.
841
+ # @return [::Numeric]
842
+ # @!attribute [rw] metadata
843
+ # Additional headers to be sent with the call.
844
+ # @return [::Hash{::Symbol=>::String}]
845
+ # @!attribute [rw] retry_policy
846
+ # The retry policy. The value is a hash with the following keys:
847
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
848
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
849
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
850
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
851
+ # trigger a retry.
852
+ # @return [::Hash]
853
+ # @!attribute [rw] quota_project
854
+ # A separate project against which to charge quota.
855
+ # @return [::String]
856
+ # @!attribute [rw] universe_domain
857
+ # The universe domain within which to make requests. This determines the
858
+ # default endpoint URL. The default value of nil uses the environment
859
+ # universe (usually the default "googleapis.com" universe).
860
+ # @return [::String,nil]
861
+ # @!attribute [rw] logger
862
+ # A custom logger to use for request/response debug logging, or the value
863
+ # `:default` (the default) to construct a default logger, or `nil` to
864
+ # explicitly disable logging.
865
+ # @return [::Logger,:default,nil]
866
+ #
867
+ class Configuration
868
+ extend ::Gapic::Config
869
+
870
+ # @private
871
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
872
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
873
+
874
+ config_attr :endpoint, nil, ::String, nil
875
+ config_attr :credentials, nil do |value|
876
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
877
+ allowed.any? { |klass| klass === value }
878
+ end
879
+ config_attr :scope, nil, ::String, ::Array, nil
880
+ config_attr :lib_name, nil, ::String, nil
881
+ config_attr :lib_version, nil, ::String, nil
882
+ config_attr :timeout, nil, ::Numeric, nil
883
+ config_attr :metadata, nil, ::Hash, nil
884
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
885
+ config_attr :quota_project, nil, ::String, nil
886
+ config_attr :universe_domain, nil, ::String, nil
887
+ config_attr :logger, :default, ::Logger, nil, :default
888
+
889
+ # @private
890
+ def initialize parent_config = nil
891
+ @parent_config = parent_config unless parent_config.nil?
892
+
893
+ yield self if block_given?
894
+ end
895
+
896
+ ##
897
+ # Configurations for individual RPCs
898
+ # @return [Rpcs]
899
+ #
900
+ def rpcs
901
+ @rpcs ||= begin
902
+ parent_rpcs = nil
903
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
904
+ Rpcs.new parent_rpcs
905
+ end
906
+ end
907
+
908
+ ##
909
+ # Configuration RPC class for the CrossSiteNetworks API.
910
+ #
911
+ # Includes fields providing the configuration for each RPC in this service.
912
+ # Each configuration object is of type `Gapic::Config::Method` and includes
913
+ # the following configuration fields:
914
+ #
915
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
916
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
917
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
918
+ # include the following keys:
919
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
920
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
921
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
922
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
923
+ # trigger a retry.
924
+ #
925
+ class Rpcs
926
+ ##
927
+ # RPC-specific configuration for `delete`
928
+ # @return [::Gapic::Config::Method]
929
+ #
930
+ attr_reader :delete
931
+ ##
932
+ # RPC-specific configuration for `get`
933
+ # @return [::Gapic::Config::Method]
934
+ #
935
+ attr_reader :get
936
+ ##
937
+ # RPC-specific configuration for `insert`
938
+ # @return [::Gapic::Config::Method]
939
+ #
940
+ attr_reader :insert
941
+ ##
942
+ # RPC-specific configuration for `list`
943
+ # @return [::Gapic::Config::Method]
944
+ #
945
+ attr_reader :list
946
+ ##
947
+ # RPC-specific configuration for `patch`
948
+ # @return [::Gapic::Config::Method]
949
+ #
950
+ attr_reader :patch
951
+
952
+ # @private
953
+ def initialize parent_rpcs = nil
954
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
955
+ @delete = ::Gapic::Config::Method.new delete_config
956
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
957
+ @get = ::Gapic::Config::Method.new get_config
958
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
959
+ @insert = ::Gapic::Config::Method.new insert_config
960
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
961
+ @list = ::Gapic::Config::Method.new list_config
962
+ patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
963
+ @patch = ::Gapic::Config::Method.new patch_config
964
+
965
+ yield self if block_given?
966
+ end
967
+ end
968
+ end
969
+ end
970
+ end
971
+ end
972
+ end
973
+ end
974
+ end
975
+ end